Windows Presentation Foundation Designer Extensibility for Visual Studio
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

Visual Basic (Declaration)
Public MustInherit Class ModelProperty
Visual Basic (Usage)
Dim instance As ModelProperty
C#
public abstract class ModelProperty
Visual C++
public ref class ModelProperty abstract
JScript
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 nullNothingnullptra 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

Other Resources

Tags :


Page view tracker