ShapeElement.AssociateValueWith Method

Definition

Overloads

AssociateValueWith(Store, AssociatedPropertyInfo)

Associates this shape's resource value with an IMS property value. Use this method when the IMS property exists on an element that is not this ShapeElement.

AssociateValueWith(Store, Guid)

Associates this shape's resource with an IMS property value on the ShapeElement itself.

AssociateValueWith(Store, AssociatedPropertyInfo)

Associates this shape's resource value with an IMS property value. Use this method when the IMS property exists on an element that is not this ShapeElement.

public:
 static void AssociateValueWith(Microsoft::VisualStudio::Modeling::Store ^ store, Microsoft::VisualStudio::Modeling::Diagrams::AssociatedPropertyInfo ^ propertyInfo);
public static void AssociateValueWith (Microsoft.VisualStudio.Modeling.Store store, Microsoft.VisualStudio.Modeling.Diagrams.AssociatedPropertyInfo propertyInfo);
static member AssociateValueWith : Microsoft.VisualStudio.Modeling.Store * Microsoft.VisualStudio.Modeling.Diagrams.AssociatedPropertyInfo -> unit
Public Shared Sub AssociateValueWith (store As Store, propertyInfo As AssociatedPropertyInfo)

Parameters

store
Store

Store containing the element instances that should be associated.

propertyInfo
AssociatedPropertyInfo

Remarks

ShapeElement resources can be associated with an IMS property. The associated ShapeElements will automatically update by receiving Invalidate calls when the IMS property value changes. You can change resources in response to the changes by overriding the OnPrePaint method and changing the resources there.

Applies to

AssociateValueWith(Store, Guid)

Associates this shape's resource with an IMS property value on the ShapeElement itself.

public:
 static void AssociateValueWith(Microsoft::VisualStudio::Modeling::Store ^ store, Guid domainPropertyId);
public static void AssociateValueWith (Microsoft.VisualStudio.Modeling.Store store, Guid domainPropertyId);
static member AssociateValueWith : Microsoft.VisualStudio.Modeling.Store * Guid -> unit
Public Shared Sub AssociateValueWith (store As Store, domainPropertyId As Guid)

Parameters

store
Store

Store containing the element instances that should be associated.

domainPropertyId
Guid

The guid supplied in the MetaObject attribute of a property on this ShapeElement.

Remarks

ShapeElement resources can be associated with an IMS property. The associated ShapeElements will automatically update by receiving Invalidate calls when the IMS property value changes. You can change resources in response to the changes by overriding the OnPrePaint method and changing the resources there.

Applies to