Hi Everybody: I am using a Legend element to list all the layers in a map. However, I don't want the invisible graphic layer to show up in the legend. Is there any way for me to do that? Following is the code I have now (listing the graphic layer).================================================<esri:Legend x:Name="Legend" Map="{Binding ElementName=Map}" LayerItemsMode="Flat" ShowOnlyVisibleLayers="False"><esri:Legend.MapLayerTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <CheckBox Content="" IsChecked="{Binding IsEnabled, Mode=TwoWay}" ></CheckBox> <TextBlock Text="{Binding Label}"></TextBlock> </StackPanel> </DataTemplate></esri:Legend.MapLayerTemplate></esri:Legend>================================================ Thank you.
What was the problem with setting 'ShowOnlyVisibleLlayers' to true?
The problem of setting "ShowOnlyVisibleLayers" is that: if I uncheck the checkbox binded to the visible property of the layer, then then layer will disappear immediately from the table of content, such that I cannot get it back into display.
I agree but what is the difference with setting LayerIds property at startup?
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.