Select to view content in your preferred language

Root element is NOT checked in Legend Control

747
2
08-01-2012 05:08 AM
LakshmananVenkatesan
Occasional Contributor II
Hello

I have legend like this below - but issue is main root element 'Group Layer' is not being checked in legend  control of the application. But this is checked in map document. please help how to set to checked to visible by default (on loading map) ?


Group Layer
   Group A
     Layer A1
     Layer A2
     Layer A3
  Group B
     Group B1
        Layer B1
        Layer B2
      Group B2
        Layer B2
0 Kudos
2 Replies
nakulmanocha
Esri Regular Contributor
Are you working with esri:Legend control? You can create your own Group Layer and push individual FeatureLayers into the GroupLayer.  Have you looked at this sample

http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#GroupLayers
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I have legend like this below - but issue is main root element 'Group Layer' is not being checked in legend control of the application. But this is checked in map document.


I would need more infos about:
- what kind of layer is your 'Group Layer' (is it a Group Layer Collection or a sub group layer inside a DynamicMapServiceLayer?)
- the meaning of 'is not being checked in legend control' : by default there is no checkbox in the legend. You can customize it to add checkboxes but in this case I need to know how you binded that checkbox.

If for example you binded your checkbox to LayerItemViewModel.IsEnabled and if your layer is a group layer collection, the checkbox represents the group layer visibility so you should not be able to have a group layer visible in the map and not checked in the legend.
0 Kudos