ArcGIS Runtime SDK for .NET Samples

List KML contents

Show Kml node hierarchy

Loading

Code

<UserControl
    x:Class="ArcGISRuntime.WPF.Samples.ListKmlContents.ListKmlContents"
    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"
    xmlns:listKmlContents="clr-namespace:ArcGISRuntime.WPF.Samples.ListKmlContents">
    <Grid>
        <esri:SceneView x:Name="MySceneView" />
        <Border Style="{StaticResource BorderStyle}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <TextBlock Text="Tap to zoom to KML content."
                           Grid.Row="0" Margin="5"
                           Foreground="Black" FontWeight="Bold" TextAlignment="Center" />
                <TreeView Name="LayerTreeView" Grid.Row="1" SelectedItemChanged="LayerTreeView_OnSelectedItemChanged">
                    <TreeView.ItemTemplate>
                        <HierarchicalDataTemplate DataType="{x:Type listKmlContents:LayerDisplayVM}"
                                                  ItemsSource="{Binding Children}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding}" />
                            </StackPanel>
                        </HierarchicalDataTemplate>
                    </TreeView.ItemTemplate>
                </TreeView>
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code