Diagram.IsOrphaned(ShapeElement) Method

Definition

Determines if a shape is orphaned. A shape is considered "orphaned" if it should be backed by a ModelElement, but it is not. If a shape is determined to be "orphaned", it's OnOrphaned() method will be called, which will remove the shape with the base implementation. The base implementation consider a shape under following two cases "orphaned":

  1. It has a PresentationViewsSubject link out of it, but the Subject cannot be resolved.
  2. It is a connector that should be mapped to an element link, but the underlying link cannot be found. (We special-case connectors because its PresentationViewsSubject link is not serialized by default).
public:
 virtual bool IsOrphaned(Microsoft::VisualStudio::Modeling::Diagrams::ShapeElement ^ shapeElement);
public virtual bool IsOrphaned (Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement shapeElement);
abstract member IsOrphaned : Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement -> bool
override this.IsOrphaned : Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement -> bool
Public Overridable Function IsOrphaned (shapeElement As ShapeElement) As Boolean

Parameters

shapeElement
ShapeElement

Shape to check

Returns

True if the shape is orphaned, false otherwise.

Applies to