I have a bunch of TiledMapServiceaLayers, WMSLayers, Graphic layers etc.I have a layer list that is showing each of them and it has a visablility slider...Everything is great...But I want to hide a few of them...I dont want the user to be able to turn on and off specific layers, as I am doing this with code...What would be the best way to control exactly which mapservices will actually show up in the layer list?Can I even do this?
<ListBox x:Name="MyList2" Height="Auto" ItemsSource="{Binding ElementName=MyMap, Path=Layers}" MouseLeave="ButtonHideLayerList">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding Visible, Mode=TwoWay}" />
<Slider Margin="-5,0,0,0" Minimum="0" Maximum="2" Width="30"
Value="{Binding Opacity, Mode=TwoWay}" Height="18" />
<TextBlock Text="{Binding ID, Mode=OneWay}" Margin="5,0,0,0" >
<ToolTipService.ToolTip>
<StackPanel MaxWidth="400">
<TextBlock FontWeight="Bold" Text="HUH" TextWrapping="Wrap" />
<TextBlock Text="WOW" TextWrapping="Wrap" />
</StackPanel>
</ToolTipService.ToolTip>
</TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>