Select to view content in your preferred language

How to reverse the order of the layers in the Legend Control?

3808
3
Jump to solution
02-17-2013 11:05 PM
Labels (1)
teamIgal
Deactivated User
I want the order of my legend in my ArcGIS Runtime application to be consistent with the order of the table of contents in ArcMap.

That means the top layers of the map appear at the top of the Legend.
The ArcGIS Legend control, however, displays the top layers of the map at the bottom of the legend.

I want this order reversed, I want the the top layer in the legend control, to be the top layer in the map.

Any idea on how to implement this?
Thanks.
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
Setting Legend.ReverseLayersOrder to true seems to be what you need:)

View solution in original post

0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
Setting Legend.ReverseLayersOrder to true seems to be what you need:)
0 Kudos
teamIgal
Deactivated User
Amazing, that's exactly what I was looking for! Thank.

For future cases like this, should I simply open the help file and read every one of the properties or is there any other more efficient way?

Because automatically, I look at the samples, and if the functionality is not present there, I assume it's not supported.
0 Kudos
AnttiKajanus1
Deactivated User
Hi,

You should think Samples as a simple (and simplified) examples and use API / Concept documentation to get the actual information about the API and controls properties. Esri cannot provide all different scenarios how to use the controls in samples to keep them easily readable and understandable.

If you are uncertain about something, then this is good place to ask. 😉
0 Kudos