ShapeElement::IterateShapes Method (IShapeIterator^)
Visual Studio 2015
Iterates through a shape and its child shapes.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
Parameters
- iterator
-
Type:
Microsoft.VisualStudio.Modeling.Diagrams::IShapeIterator^
The iterator to use with the shape.
This method recursively goes through all child shapes that are assigned to the shape and calls the iterator when each child shape is encountered. By default, the traversal is depth first, and nested child shapes are iterated before relative child shapes.
protected virtual void CheckForOrphanedShapes(DslDiagrams::Diagram diagram, DslModeling::SerializationResult serializationResult) { global::System.Collections.Generic.List<DslDiagrams::ShapeElement> orphanedShapes = new global::System.Collections.Generic.List<DslDiagrams::ShapeElement>(); diagram.IterateShapes(new OrphanedShapeIterator(orphanedShapes, diagram)); foreach (DslDiagrams::ShapeElement orphanedShape in orphanedShapes) { if (serializationResult.Failed) break; orphanedShape.OnOrphaned(serializationResult); } }
Show: