<Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <esri:LayerCollection x:Key="MyLayers"/> </Grid.Resources> <ListBox x:Name="MyList" ItemsSource="{StaticResource MyLayers}"> public MainPage() { InitializeComponent(); var layers = LayoutRoot.Resources["MyLayers"] as LayerCollection; foreach (var l in MyMap.Layers) { //only add layers you want to control visibility/opacity layers.Add(l); } }
<Slider Value="{Binding ElementName=MyMap, Path=Layers[layerID].Opacity, Mode=TwoWay}" Minimum="0" Maximum="100" /> <CheckBox IsChecked="{Binding ElementName=MyMap, Path=Layers[layerID].Visible, Mode=TwoWay}" />
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.