PresentationElement Class

An element that appears in a user interface and represents a visible presentation of a domain model element.

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

Syntax

'Declaration
<DomainObjectIdAttribute("9321e0d1-1221-458d-834f-2dc0769ce683")> _
<DescriptionResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement.Description",  _
    GetType(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")> _
<CLSCompliantAttribute(True)> _
<DisplayNameResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement.DisplayName",  _
    GetType(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")> _
Public MustInherit Class PresentationElement _
    Inherits ModelElement
'Usage
Dim instance As PresentationElement
[DomainObjectIdAttribute("9321e0d1-1221-458d-834f-2dc0769ce683")]
[DescriptionResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement.Description", 
    typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
[CLSCompliantAttribute(true)]
[DisplayNameResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement.DisplayName", 
    typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
public abstract class PresentationElement : ModelElement
[DomainObjectIdAttribute(L"9321e0d1-1221-458d-834f-2dc0769ce683")]
[DescriptionResourceAttribute(L"Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement.Description", 
    typeof(CoreDesignSurfaceDomainModel), L"Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
[CLSCompliantAttribute(true)]
[DisplayNameResourceAttribute(L"Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement.DisplayName", 
    typeof(CoreDesignSurfaceDomainModel), L"Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
public ref class PresentationElement abstract : public ModelElement
public abstract class PresentationElement extends ModelElement

Remarks

A typical subclass is ShapeElement, whose instances are shapes and links on a diagram. All diagram, shape and link classes defined in a DSL Definition are PresentationElements.

In a DSL, the semantic aspects of a model are separated from their presentation to the user. One class of domain model element could have more than one alternative type of presentation in the user interface, for example as a shape, or as a line of text. In a DSL whose models are manipulated entirely through an API, the domain model elements do not need a presentation at all.

A PresentationElement is linked to the model element that it displays using the PresentationViewsSubject relationship, and the relationship can be navigated using the ModelElement property.

In a DSL Definition file, the Domain Element Mapping between a shape and a domain class determines what subclasses of domain element and presentation element are linked using PresentationViewsSubject.

Presentation elements and PresentationViewsSubject links are usually created in a separate Partitionfrom the domain model elements.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.ModelElement
    Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement
      Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement

Thread Safety

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

See Also

Reference

PresentationElement Members

Microsoft.VisualStudio.Modeling.Diagrams Namespace

Change History

Date

History

Reason

Extended and clarified descriptions.

Customer feedback.