PresentationViewsSubject Class

The relationship between domain model elements and their presentation in a user interface, typically a diagram.

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

Syntax

'Declaration
<DescriptionResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.PresentationViewsSubject.Description",  _
    GetType(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")> _
<DomainObjectIdAttribute("12191931-25c5-4008-8410-c1252f0dc7dc")> _
<DomainRelationshipAttribute> _
<CLSCompliantAttribute(True)> _
<DisplayNameResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.PresentationViewsSubject.DisplayName",  _
    GetType(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")> _
Public Class PresentationViewsSubject _
    Inherits ElementLink
'Usage
Dim instance As PresentationViewsSubject
[DescriptionResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.PresentationViewsSubject.Description", 
    typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
[DomainObjectIdAttribute("12191931-25c5-4008-8410-c1252f0dc7dc")]
[DomainRelationshipAttribute]
[CLSCompliantAttribute(true)]
[DisplayNameResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.PresentationViewsSubject.DisplayName", 
    typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
public class PresentationViewsSubject : ElementLink
[DescriptionResourceAttribute(L"Microsoft.VisualStudio.Modeling.Diagrams.PresentationViewsSubject.Description", 
    typeof(CoreDesignSurfaceDomainModel), L"Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
[DomainObjectIdAttribute(L"12191931-25c5-4008-8410-c1252f0dc7dc")]
[DomainRelationshipAttribute]
[CLSCompliantAttribute(true)]
[DisplayNameResourceAttribute(L"Microsoft.VisualStudio.Modeling.Diagrams.PresentationViewsSubject.DisplayName", 
    typeof(CoreDesignSurfaceDomainModel), L"Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
public ref class PresentationViewsSubject : public ElementLink
public class PresentationViewsSubject extends ElementLink

Remarks

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.

This relationship links domain model elements to presentation elements.

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.

These are the most common techniques for using this relationship:

  • To navigate from a domain model element to its user interface presentation, use the static method GetPresentation(ModelElement).

  • To navigate from a presentation element to its domain model element, use the ModelElement property on the presentation element.

  • To create a new link, set the ModelElement property of the presentation element. You do not usually have to do this explicitly, because a shape is created automatically when you add a new element to the domain model.

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

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.ModelElement
    Microsoft.VisualStudio.Modeling.ElementLink
      Microsoft.VisualStudio.Modeling.Diagrams.PresentationViewsSubject

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

PresentationViewsSubject Members

Microsoft.VisualStudio.Modeling.Diagrams Namespace

[T:Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement ]

[T:Microsoft.VisualStudio.Modeling.Diagrams.ModelElement ]

Change History

Date

History

Reason

Extended and clarified member descriptions.

Customer feedback.