If I add a shape file to my map and then a dynamic custom layer inherited from a BaseDynamicLayer, then the shape file is lower on the viewing stack then my custom layer, and it displays correctly.
mapControl.AddShapeFile(directoryPath, shapeFile); mapControl.AddLayer(dynamicCustomLayer); //this is ok
But if I add my dynamicCustomLayer first, and then add a Shape file, the shape file is makes the dynamic layer non viewable because it is higher on the viewing stack...
mapControl.AddLayer(dynamicCustomLayer); mapControl.AddShapeFile(directoryPath, shapeFile);//now my dynamic layer is invisible
How can I ensure that the dynamic custom layer is always on top of the viewing stack even if my user adds a shape file after the custom layer was enabled... Thanks in advance :)
I'm using C# arcengine 10