ArcGIS Runtime SDK for .NET Samples

Blend renderer

Apply blend renderer to a raster layer
Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.ChangeBlendRenderer.ChangeBlendRenderer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="5,5,5,5" />
            <Setter Property="FontWeight" Value="SemiBold" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
        <Style TargetType="ComboBox">
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="Margin" Value="5,5,5,5" />
        </Style>
        <Style TargetType="Slider">
            <Setter Property="Margin" Value="5,5,5,5" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <esri:MapView x:Name="MyMapView" />
        <Border
            Background="White" BorderBrush="Black" BorderThickness="1"
            HorizontalAlignment="Right" VerticalAlignment="Top"
            Margin="30" Padding="20" Width="375">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBlock
                    Text="Tap on the 'Update renderer' button to change the settings for the blend renderer. The sample allows you to change the Altitude, Azimuth, SlopeType and ColorRamp. If you use None as the ColorRamp, a standard hill shade raster output is displayed. For all the other ColorRamp types an elevation raster is used."
                    Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5"
                    HorizontalAlignment="Center" VerticalAlignment="Center"
                    FontWeight="Normal" TextWrapping="Wrap" />
                <TextBlock Text="Altitude"
                           Grid.Row="1" Grid.Column="0" />
                <Slider x:Name="AltitudeSlider"
                        Grid.Row="1" Grid.Column="1"
                        Minimum="0" Maximum="90" Value="45">
                    <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" />
                <Slider x:Name="AzimuthSlider"
                        Grid.Row="2" Grid.Column="1"
                        Minimum="0" Maximum="360" Value="180">
                    <Slider.ToolTip>
                        <ToolTip
                            Content="{Binding RelativeSource={RelativeSource Self},
                               Path=PlacementTarget.Value}"
                            ContentStringFormat="{}{0:0}" />
                    </Slider.ToolTip>
                </Slider>
                <TextBlock Text="Slope Type"
                           Grid.Row="3" Grid.Column="0" />
                <ComboBox x:Name="SlopeTypes"
                          Grid.Row="3" Grid.Column="1" />
                <TextBlock Text="Color Ramp"
                           Grid.Row="4" Grid.Column="0" />
                <ComboBox x:Name="ColorRamps"
                          Grid.Row="4" Grid.Column="1" />
                <Button x:Name="UpdateRenderer"
                        Content="Update renderer"
                        Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2"
                        Margin="5"
                        IsEnabled="False"
                        Click="OnUpdateRendererClicked" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code