ModelProperty Class

Represents a property on an item.

Namespace:  Microsoft.Windows.Design.Model
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public MustInherit Class ModelProperty
'Usage
Dim instance As ModelProperty
public abstract class ModelProperty
public ref class ModelProperty abstract
public abstract class ModelProperty

Remarks

A ModelProperty represents a property on an item. ModelProperty objects are associated with an instance of an item, which enables them to have simple Value get/set properties, instead of the more cumbersome GetValue/SetValue mechanism of PropertyDescriptor. A ModelProperty’s value may come from a locally set value, or it may be inherited from somewhere higher up in the property mechanism. Because all items in the tree contain Source properties, you can easily determine the real source of a property value by using the following code:

Console.WriteLine(property.Value.Source); 

Value returns nulla null reference (Nothing in Visual Basic) if the property is not set anywhere in the hierarchy. Type converters and editors defined on the underlying data model are wrapped so that they accept ModelItem objects as parameters.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Model.ModelProperty

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

ModelProperty Members

Microsoft.Windows.Design.Model Namespace

Other Resources

WPF Designer Extensibility Architecture