ArcGIS Runtime SDK for .NET Samples

Raster hillshade renderer

Apply a hillshade renderer to an elevation raster
Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.RasterHillshade.RasterHillshade"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
    <Grid>
        <esri:MapView x:Name="MyMapView" />
        <Border
            Background="White" BorderBrush="Black" BorderThickness="1"
            HorizontalAlignment="Right" VerticalAlignment="Top"
            Margin="10" Padding="10" Width="300">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="3*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <TextBlock Text="Slope type:"
                           Grid.Row="0" Grid.Column="0"
                           TextAlignment="Right" VerticalAlignment="Center"/>
                <ComboBox x:Name="SlopeTypeCombo"
                          Grid.Row="0" Grid.Column="1"
                          Margin="5" />
                <TextBlock Grid.Row="1" Grid.Column="0"
                           TextAlignment="Right" VerticalAlignment="Center"
                           Text="Altitude:" />
                <Slider x:Name="AltitudeSlider"
                        Grid.Row="1" Grid.Column="1"
                        Margin="5"
                        Minimum="0" Maximum="90">
                    <Slider.ToolTip>
                        <ToolTip
                            Content="{Binding RelativeSource={RelativeSource Self},
                               Path=PlacementTarget.Value}"
                            ContentStringFormat="{}{0:0}" />
                    </Slider.ToolTip>
                </Slider>
                <TextBlock Text="Azimuth:"
                           Grid.Row="2" Grid.Column="0"
                           TextAlignment="Right" VerticalAlignment="Center" />
                <Slider x:Name="AzimuthSlider"
                        Grid.Row="2" Grid.Column="1"
                        Margin="5"
                        Minimum="0" Maximum="360">
                    <Slider.ToolTip>
                        <ToolTip
                            Content="{Binding RelativeSource={RelativeSource Self},
                               Path=PlacementTarget.Value}"
                            ContentStringFormat="{}{0:0}" />
                    </Slider.ToolTip>
                </Slider>
                <Button x:Name="ApplyHillshadeButton"
                        Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
                        Margin="5" Padding="3"
                        IsEnabled="False"
                        Content="Apply hillshade"
                        Click="ApplyHillshadeButton_Click" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code