Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

ShapeElement Class

Represents a diagram or a shape or connector in a diagram. ShapeElements encapsulate the visual presentation of model elements.

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

	typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
	typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
public abstract class ShapeElement : PresentationElement, 

To navigate to the model element or relationship that the shape represents, use ModelElement.

Important subtypes include:

  • Diagram – represents a collection of shapes and connectors. The content of a Diagram is persisted in a .diagram file. If you specify a diagram class in your DSL Definition, it is derived from this class.

  • NodeShape – represents a shape that has a non-zero area, not a connector. If you specify shape classes in your DSL Definition, they are derived from NodeShape.

  • BinaryLinkShape – represents a line between two NodeShapes. If you specify connector classes in your DSL Definition, they are derived from this BinaryLinkShape.

For more information, see How to: Access a Presentation Element from a Model Element.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




Extended and clarified descriptions.

Customer feedback.

Community Additions

© 2015 Microsoft