-
Notifications
You must be signed in to change notification settings - Fork 524
/
Copy pathGroupLayers.xaml
46 lines (46 loc) · 2.46 KB
/
GroupLayers.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<UserControl x:Class="ArcGIS.WinUI.Samples.GroupLayers.GroupLayers"
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"
xmlns:mapping="using:Esri.ArcGISRuntime.Mapping">
<Grid>
<esriUI:SceneView x:Name="MySceneView" />
<Border Style="{StaticResource BorderStyle}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Margin="5"
FontWeight="SemiBold"
Foreground="Black"
Text="Select layers for display."
TextAlignment="Center" />
<!-- This is a workaround until UWP TreeView supports proper HierarchicalDataTemplate. -->
<ListView Grid.Row="1"
ItemsSource="{Binding ElementName=MySceneView, Path=Scene.OperationalLayers}"
SelectionMode="None">
<ListView.ItemTemplate>
<DataTemplate x:DataType="mapping:Layer">
<StackPanel>
<CheckBox Content="{Binding Name, Mode=OneWay}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
<ListView Margin="15,0,0,0"
ItemsSource="{Binding SublayerContents}"
SelectionMode="None">
<ListView.ItemTemplate>
<DataTemplate x:DataType="mapping:ILayerContent">
<StackPanel>
<CheckBox Content="{Binding Name, Mode=OneWay}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Border>
</Grid>
</UserControl>