Legend Tree Mode Organization w/ Graphics Layers

2596
2
Jump to solution
05-22-2014 09:45 AM
Labels (1)
EthanGill
New Contributor
Hey everyone,

I'm currently building a wpf application which utilizes 5-20 graphics layers. These layers fit under three varying categories which I would like to reflect in the legend.

For Instance:


  1. Category 1


    1. Layer 1

    2. Layer 2

  2. Category 2


    1. Layer 1

    2. Layer 2

    3. Layer 3

  3. Category 3


    1. Layer 1

I don't quite understand how to accomplish this in code behind. What property defines where in the legend tree structure a graphics layer resides?


Any help or suggestions on literature would be greatly appreciated!

Cheers,
Ethan
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
The legend reflects the organization of the layers in the map.

To get a hierarchy of layer, you have to organize your graphics layers into group layers.
Then you have to set your Legend.LayerItemsMode to "Tree".

The GroupLayers SDK sample demonstrates that.

View solution in original post

0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
The legend reflects the organization of the layers in the map.

To get a hierarchy of layer, you have to organize your graphics layers into group layers.
Then you have to set your Legend.LayerItemsMode to "Tree".

The GroupLayers SDK sample demonstrates that.
0 Kudos
EthanGill
New Contributor
The legend reflects the organization of the layers in the map.

To get a hierarchy of layer, you have to organize your graphics layers into group layers.
Then you have to set your Legend.LayerItemsMode to "Tree".

The GroupLayers SDK sample demonstrates that.


This worked great. Thanks!
0 Kudos