ArcGIS Runtime SDK for .NET Samples

Style WMS layers

Apply styles to a WMS layer
Loading

Code

<UserControl
    x:Class="ArcGISRuntime.WPF.Samples.StyleWmsLayer.StyleWmsLayer"
    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="30" Padding="20" Width="375">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Choose a style." 
                           Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                           Margin="0,0,0,2" TextWrapping="Wrap"
                           TextAlignment="Center" FontWeight="SemiBold" />
                <Button x:Name="FirstStyleButton"
                        Grid.Row="1" Grid.Column="0" 
                        Margin="0,5,2.5,0"
                        Content="Style 1"
                        IsEnabled="False"
                        Click="FirstStyleButton_Clicked"/>
                <Button x:Name="SecondStyleButton"
                        Grid.Row="1" Grid.Column="1"
                        Margin="2.5,5,0,0"
                        Content="Style 2"
                        IsEnabled="False"
                        Click="SecondStyleButton_Clicked" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code