Changing the ZOrder doesn't change the Z-Order! You need to rearrange the content of the diagram's NestedChildShapes, using the Move operation.
See the Example.Components sample that you'll find by opening the VS SDK Samples browser - it will be in somewhere like Program Files\VisualStudio 2005 SDK\2006.09\VisualStudioIntegration\Samples\DSLTools\Example.DesignerCustomizations\Example.Components
Open Dsl\CustomCode\NestedShapes.cs and search in FixZOrder.
Look particularly at lines like
LinkedElementCollection <ShapeElement> allShapes = movedShape.ParentShape.NestedChildShapes;
allShapes.Move(i, allShapes.Count - 1);
- Alan [Microsoft] |