I am working on an application that has 3 different types of custom made controls - Planes, Connectors and Elements. User can add them on a canvas, move, delete them etc. So far all good. These 3 type of control MUST appear in a specific Z order no matter in which order user adds them on the canvas. That's where the problem is.
Planes MUST be at the bottom most position, elements MUST be at top most position and the connectors MUST be in-between Planes and the elements. This must be the case no matter how user add them on the canvas as well as when they are loaded from an XML file (which can be created by saving their positions and other properties etc.)
My question is - what is the best method to achieve the Z ordering that I want? Can multiple controls have same Z order (as mentioned above - all the planes must be on bottom most order and so on...)