Diagram.IsOrphaned Method
Verifies whether a shape is linked to another shape in the diagram.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
'Declaration
Public Overridable Function IsOrphaned ( _
shapeElement As ShapeElement _
) As Boolean
public virtual bool IsOrphaned(
ShapeElement shapeElement
)
public:
virtual bool IsOrphaned(
ShapeElement^ shapeElement
)
abstract IsOrphaned :
shapeElement:ShapeElement -> bool
override IsOrphaned :
shapeElement:ShapeElement -> bool
public function IsOrphaned(
shapeElement : ShapeElement
) : boolean
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.
Remarks
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.
Examples
public void OnShape(DslDiagrams::ShapeElement shape)
{
if (this.diagram.IsOrphaned(shape))
this.orphanedShapes.Add(shape);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.