Let me start by explaining my business issue. I have two Graphics layer on a map, one of them has the graphics I want to show, the other one has TextSymbol as symbols and shows as a label of the graphics in the first layer (see the attachment for clarification). So, now let's say the user turns off the graphics layer, then the "labels layer" will still be turned on, so that looks awkward. So basically I would like the "labels layer" to be turned off in the same event when the graphics are turned off. Ok, so here is the technical stuff. I have a Legend added to my map where the users can turn the layers on and off: <esri:Legend Name="legend1" Map="{Binding ElementName=map1}" LayerItemsMode="Tree" ShowOnlyVisibleLayers="False" FontSize="11" Refreshed="legend1_Refreshed"> <esri:Legend.MapLayerTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <CheckBox Content="{Binding Label}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" IsEnabled="{Binding IsInScaleRange}"> </CheckBox> <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" /> </StackPanel> </DataTemplate> </esri:Legend.MapLayerTemplate> <esri:Legend.LayerTemplate> <DataTemplate> <CheckBox Content="{Binding Label}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" IsEnabled="{Binding IsInScaleRange}" > </CheckBox> </DataTemplate> </esri:Legend.LayerTemplate> </esri:Legend>
So, this is what I need help with. What I'd like to do is capture the event that turns the layers on and off. I guess that would be for the CheckBox?? Or can I capture it in the layer per se?? So, say that I extend the layer and interesect the event there?? Thanks!