Can I control draw order of children within a single ElementLayer

397
1
Jump to solution
05-28-2012 06:27 PM
caseycupp
New Contributor III
I have an element layer with lots of points on a map. On the event of clicking one of these items,  I am trying to add an popup item to this ElementLayer.

Everything is working except the draw order. The popup item I am adding at the end is always under the other items in that ElementLayer. It doesn't seem to matter if I add it as the first or last item...


thisElementLayer.Children.Insert(thisElementLayer.Children.Count - 1, maptipItem); //shows under other items in thisElementLayer
//thisElementLayer.Children.Insert(0, maptipItem); //shows under other items in thisElementLayer

casey
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
You can set the Canvas.ZIndex attached property in order to define the draw order of the elements.

Something like:

maptipItem.SetValue(Canvas.Zindex, 100);

View solution in original post

0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
You can set the Canvas.ZIndex attached property in order to define the draw order of the elements.

Something like:

maptipItem.SetValue(Canvas.Zindex, 100);
0 Kudos