Display group layers in legend

6936
2
05-08-2015 03:42 PM
BjørnarSundsbø
Occasional Contributor

Hi,

I would like to create some sort of layer list, where I can toggle visibility of layers. The display should also include group layers. I tried using the Legend control in the toolkit, but it only displays a flat structure. Looking at the source code, there are some layer options, which includes ReturnGroupLayers, but I'm not able to set this. Is this limitation a related to "not yet implemented", or something that will not be supported?

I figured I could hide display of symbols, and only display the tree structure of the layers, and filter out the layers I don't want using the Refreshed event. I'd like to support both tree structure and/or expanders for the group layers. Setting IsHidden = false if IsGroupLayer is true in Refreshed event doesn't have any effect.

Is this something that will be supported in the near future, or do I have to modify the sources myself to support this?

0 Kudos
2 Replies
BjørnarSundsbø
Occasional Contributor

Or perhaps just bind to Map.Layers, and display data in some sort of itemspresenter

ChristinaKochan1
Occasional Contributor

Try reading through this answer and see if it helps you: Extending Legend Control (Re: Second part)

0 Kudos