Stretch renderer

Apply a stretch renderer to a raster layer
Loading

Code

<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.ChangeStretchRenderer.ChangeStretchRenderer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
    <UserControl.Resources>
        <Style TargetType="TextBox">
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="Margin" Value="0,5,0,5" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="TextAlignment" Value="Center" />
        </Style>
        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="0,5,5,5" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="FontWeight" Value="SemiBold" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <esriUI: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" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBlock
                    Text="Choose a stretch renderer type, adjust the parameter values, then tap 'Update renderer'."
                    Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                    Margin="0"
                    TextWrapping="Wrap" />
                <ComboBox x:Name="RendererTypes"
                          Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                          Margin="0,5,0,5"
                          HorizontalAlignment="Stretch"
                          SelectionChanged="RendererTypes_SelectionChanged" />
                <TextBlock x:Name="FirstParameterLabel"
                           Grid.Row="2" Grid.Column="0" />
                <TextBox x:Name="FirstParameterInput"
                         Grid.Row="2" Grid.Column="1" />
                <TextBlock x:Name="SecondParameterLabel"
                           Grid.Row="3" Grid.Column="0" />
                <TextBox x:Name="SecondParameterInput"
                         Grid.Row="3" Grid.Column="1" />
                <Button Content="Update renderer"
                        Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2"
                        Margin="0,5,0,0"
                        HorizontalAlignment="Stretch"
                        Click="OnUpdateRendererClicked" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code