Select to view content in your preferred language

Keeping Layer Checkbox in Sync with Layer Group & Sub-Layer Visibility

1204
2
02-05-2013 06:33 AM
ThomasBoring
Deactivated User
Hello,

The code in this article works really well if the layers in your map service DO NOT use grouping: http://forums.arcgis.com/threads/14004-Keeping-layer-checkbox-in-sync-with-layer-visibility-SL3-to-S....

Now, I've added a map service to my SL 4 app that uses layer grouping, and I want the listbox to 1) display the layer checkboxes in a nested fashion, 2) turn off sub-layers when the group is turned off, and 3) turn on sub-layers when the group is turned on--just like it works in ArcMap.  Anyone have any ideas?  I've been trying to make it work for a few days now, and I just can't figure it out.

thanks,

Tom
0 Kudos
2 Replies
ThomasBoring
Deactivated User
I'm thinking I need to use a TreeView from System.Windows.Controls to do this.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Did you look at the LegendControl in the toolkit?
It should help to achieve what you need. there is a sample here:http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#LegendWithTemplates
0 Kudos