This topic has not yet been rated - Rate this topic

TrackingPropertyDescriptor Class

Provides additional run-time type information for a tracking property of a model element.

Object
  MemberDescriptor
    PropertyDescriptor
      Microsoft.VisualStudio.Modeling.Design.ElementPropertyDescriptor
        Microsoft.VisualStudio.Modeling.Design.TrackingPropertyDescriptor
          Microsoft.VisualStudio.Modeling.DslDefinition.Design.DslDefinitionModelElementTrackingPropertyDescriptor

Namespace:  Microsoft.VisualStudio.Modeling.Design
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)
public class TrackingPropertyDescriptor : ElementPropertyDescriptor

The TrackingPropertyDescriptor type exposes the following members.

  NameDescription
Public methodTrackingPropertyDescriptor(ModelElement, DomainPropertyInfo, DomainPropertyInfo, Attribute[])Initializes a new instance of the TrackingPropertyDescriptor class.
Public methodTrackingPropertyDescriptor(ElementTypeDescriptor, ModelElement, DomainPropertyInfo, DomainPropertyInfo, Attribute[])Initializes a new instance of the TrackingPropertyDescriptor class and specifies a default value provider.
Top
  NameDescription
Protected propertyAttributeArrayGets or sets an array of attributes. (Inherited from MemberDescriptor.)
Public propertyAttributesGets the collection of attributes for this member. (Inherited from MemberDescriptor.)
Public propertyCategoryGets the category in which to group the domain property when the property is displayed in a PropertyGrid control that is set to Categorized mode. (Inherited from ElementPropertyDescriptor.)
Public propertyComponentTypeGets the type of the model element to which this property is bound. (Inherited from ElementPropertyDescriptor.)
Public propertyConverterGets the converter for the described property. (Inherited from ElementPropertyDescriptor.)
Public propertyDescriptionGets the description of the described property, as specified in the DescriptionResourceAttribute. (Inherited from ElementPropertyDescriptor.)
Public propertyDesignTimeOnlyGets whether this member should be set only at design time, as specified in the DesignOnlyAttribute. (Inherited from MemberDescriptor.)
Public propertyDisplayNameGets the display name of the described property, as specified in the DisplayNameResourceAttribute. (Inherited from ElementPropertyDescriptor.)
Public propertyDomainPropertyInfoGets the property information object that was used to create this property descriptor. (Inherited from ElementPropertyDescriptor.)
Public propertyIsBrowsableGets a value indicating whether the member is browsable, as specified in the BrowsableAttribute. (Inherited from MemberDescriptor.)
Public propertyIsInstanceBasedTest if this PropertyDescriptor is based on an instance or a static type. (Inherited from ElementPropertyDescriptor.)
Public propertyIsLocalizableGets a value indicating whether this property should be localized, as specified in the LocalizableAttribute. (Inherited from PropertyDescriptor.)
Public propertyIsReadOnlyGets a value that indicates whether the described property is read-only. (Inherited from ElementPropertyDescriptor.)
Public propertyModelElementGets the model element that was used to create this property descriptor. (Inherited from ElementPropertyDescriptor.)
Public propertyNameGets the name of the member. (Inherited from MemberDescriptor.)
Protected propertyNameHashCodeGets the hash code for the name of the member, as specified in GetHashCode. (Inherited from MemberDescriptor.)
Public propertyPropertyTypeGets the property type of the described property. (Inherited from ElementPropertyDescriptor.)
Public propertySerializationVisibilityGets a value indicating whether this property should be serialized, as specified in the DesignerSerializationVisibilityAttribute. (Inherited from PropertyDescriptor.)
Public propertySupportsChangeEventsGets a value indicating whether value change notifications for this property may originate from outside the property descriptor. (Inherited from PropertyDescriptor.)
Top
  NameDescription
Public methodAddValueChanged (Inherited from ElementPropertyDescriptor.)
Public methodCanResetValueIndicates whether the value of the domain property can be reset. (Overrides ElementPropertyDescriptor.CanResetValue(Object).)
Protected methodCreateAttributeCollectionCreates a collection of attributes using the array of attributes passed to the constructor. (Inherited from MemberDescriptor.)
Protected methodCreateInstanceCreates an instance of the specified type. (Inherited from PropertyDescriptor.)
Public methodEqualsCompares this to another object to see if they are equivalent. (Inherited from PropertyDescriptor.)
Protected methodFillAttributesAdds the attributes of the PropertyDescriptor to the specified list of attributes in the parent class. (Inherited from PropertyDescriptor.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetChildPropertiesReturns the default PropertyDescriptorCollection. (Inherited from PropertyDescriptor.)
Public methodGetChildProperties(Attribute)Returns a PropertyDescriptorCollection using a specified array of attributes as a filter. (Inherited from PropertyDescriptor.)
Public methodGetChildProperties(Object)Returns a PropertyDescriptorCollection for a given object. (Inherited from PropertyDescriptor.)
Public methodGetChildProperties(Object, Attribute)Returns a PropertyDescriptorCollection for a given object using a specified array of attributes as a filter. (Inherited from PropertyDescriptor.)
Public methodGetEditorReturns a value editor for the described property. (Inherited from ElementPropertyDescriptor.)
Public methodGetHashCodeReturns the hash code for this object. (Inherited from PropertyDescriptor.)
Protected methodGetInvocationTargetThis method returns the object that should be used during invocation of members. (Inherited from PropertyDescriptor.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodGetTypeFromNameReturns a type using its name. (Inherited from PropertyDescriptor.)
Public methodGetValueGets the value of the domain property. (Inherited from ElementPropertyDescriptor.)
Protected methodGetValueChangedHandlerRetrieves the current set of ValueChanged event handlers for a specific component (Inherited from PropertyDescriptor.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnValueChangedRaises the ValueChanged event that you implemented. (Inherited from PropertyDescriptor.)
Public methodRemoveValueChanged (Inherited from ElementPropertyDescriptor.)
Public methodResetValueResets the value of the tracking property. (Overrides ElementPropertyDescriptor.ResetValue(Object).)
Public methodSetValueSets the value of the domain property. (Inherited from ElementPropertyDescriptor.)
Public methodShouldSerializeValueIndicates whether the value of the tracking property should be serialized. (Overrides ElementPropertyDescriptor.ShouldSerializeValue(Object).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

This class provides dynamic custom property information for a tracking property.

The Domain-Specific Language Tools (DSL Tools) use this type to represent a domain class property that, until it is updated by the user, is calculated based on the value of another domain property. This type controls how a tracking property is handled by the property grid in the domain model and provides transactions for modifying the described property.

A tracking property has two states: tracking and updated by the user. This state is represented by a second, Boolean property, which is specified when the tracking property descriptor is created. By default, the value of the Boolean property should be true, which corresponds to the tracking state.

This descriptor controls whether the Reset command is enabled on the shortcut menu in the property grid for the property, and updates the value of the associated Boolean property when the tracking property is reset.

Notes to Callers

To add a tracking property to a DSL definition, implement the following features:

  • A custom property-value-changed handler for each tracked property.

  • A custom type descriptor that returns a tracking property descriptor for each tracking property.

  • Every tracking property in such a way that its value is calculated when the associated Boolean property is true.

You also have to ensure that the value of every tracking property is set correctly whenever the store is constructed, such as during creation and loading of the DSL model.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.