Condividi tramite


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

'Dichiarazione
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

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

See Also

Reference

Diagram Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace