This documentation is archived and is not being maintained.

ModelProperty Class

A ModelProperty represents a property on a ModelItem. Model properties are associated with an instance of an item, which allows them to have simple Value get/set properties instead of using the more cumbersome GetValue/SetValue mechanism of PropertyDescriptor.


Namespace:  System.Activities.Presentation.Model
Assembly:  System.Activities.Presentation (in System.Activities.Presentation.dll)

public abstract class ModelProperty

The ModelProperty type exposes the following members.

Protected methodModelPropertyCreates a new ModelProperty.

Public propertyAttachedOwnerTypeReturns the type that defines this property if IsAttached returns true; otherwise, returns null.
Public propertyAttributesReturns the attributes declared on this property.
Public propertyCollectionReturns Value cast as a ModelItemCollection.
Public propertyComputedValueReturns the currently computed value for this property. Setting a value on this property is the same as calling SetValue(Object), but can be used in data binding expressions.
Public propertyConverterReturns the type converter to use with this property.
Public propertyDefaultValueReturns the default value for this property. If the property does not define a default value, this will return null.
Public propertyDictionaryReturns Value cast as a ModelItemDictionary. If the property value is not a dictionary, this property will return null.
Public propertyIsAttachedDetermines whether the property represents an attached property from a different type.
Public propertyIsBrowsableDetermines whether the property can be shown in a property window.
Public propertyIsCollectionDetermines whether the value contained in the property is a ModelItemCollection.
Public propertyIsDictionaryDetermines whether the value contained in the property is a ModelItemDictionary.
Public propertyIsReadOnlyDetermines whether the property is read only.
Public propertyIsSetDetermines whether the value of the property is set locally.
Public propertyNameGets the name of this property.
Public propertyParentReturns the parent of this property.
Public propertyPropertyTypeReturns the data type of the property.
Public propertyValueReturns the value set into this property.

Public methodClearValueClears the local value for the property.
Public methodEqualsDetermines the equality for properties. Properties are equal if they have the same name and parent. (Overrides Object.Equals(Object).)
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 methodGetHashCodeServes as a hash function for a ModelProperty. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSetValueSets a local value on a property.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Public operatorStatic memberEqualityDetermines whether the properties are equal. Properties are equal if they have the same name and parent.
Public operatorStatic memberInequalityDetermines whether the properties are unequal. Properties are equal if they have the same name and parent.

The value of a ModelProperty may come from a locally set value, or it may be inherited from somewhere higher up in the element hierarchy. Use the Source() property of the value returned by Value to determine the source of the property value.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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