Diagram::IsOrphaned Method (ShapeElement^)

 

Verifies whether a shape is linked to another shape in the diagram.

Namespace:   Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

public:
virtual bool IsOrphaned(
	ShapeElement^ shapeElement
)

Parameters

shapeElement
Type: Microsoft.VisualStudio.Modeling.Diagrams::ShapeElement^

The shape to check.

Return Value

Type: System::Boolean

true if the shape is not linked to another shape in the diagram; otherwise, false.

If the return value is true, the shape is removed from the diagram.

When this method analyzes a shape, it removes the shape if it does not have a link shape.

public void OnShape(DslDiagrams::ShapeElement shape)
{
    if (this.diagram.IsOrphaned(shape))
        this.orphanedShapes.Add(shape);
}
Return to top
Show: