I have a list of overlays I would like to see in the map as ordered as ZIndex should do. Some overlays contain markers and do not honor the ZIndex behavior. You can verify my assertion adding the following code to your example "ZoomLevelsOnMarker" ; the code add a button and its Clik event to DescInfo window.
What is wrong ?
Thank you in advance.
public partial class ZoomLevelsOnMarker : UserControl {
private void LabelRotateAMarker_Loaded(object sender, RoutedEventArgs e)
{
...... your code ......
Button b = new Button();
b.Width = 100;
b.Height = 25;
b.Content = "Set ZIndex";
((Canvas)DescInfo.Content).Children.Add(b);
b.Click += new RoutedEventHandler(b_Click);
}
void b_Click(object sender, RoutedEventArgs e)
{
foreach (Overlay o in Map1.Overlays)
{
if(o.GetType() == typeof(WorldMapKitWmsSilverlightOverlay))
o.ZIndex = 200;
if(o.GetType() == typeof(InMemoryMarkerOverlay))
o.ZIndex = 100;
}
}