<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}" />
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.