ArcGIS Runtime SDK for .NET Samples

Change sublayer visibility

Change sublayer visibility
Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.ChangeSublayerVisibility.ChangeSublayerVisibility"
             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">
            <StackPanel>
                <TextBlock Text="Select sublayers for display."
                           TextWrapping="Wrap" TextAlignment="Center" FontWeight="SemiBold"
                           Margin="0,0,0,5" />
                <ListView x:Name="SublayerListView">
                    <ListView.ItemTemplate>
                        <DataTemplate DataType="esri:ArcGISSublayer">
                            <CheckBox Content="{Binding Name}"
                                      IsChecked="{Binding IsVisible}"
                                      Margin="5" />
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code