Udostępnij za pośrednictwem


ModelItem Class

Represents a single item in the editing model.

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

Syntax

'Declaration
Public MustInherit Class ModelItem _
    Implements INotifyPropertyChanged
'Usage
Dim instance As ModelItem
public abstract class ModelItem : INotifyPropertyChanged
public ref class ModelItem abstract : INotifyPropertyChanged
public abstract class ModelItem implements INotifyPropertyChanged

Remarks

The ModelItem class represents a single item in the editing model. An item can be anything from a window or a control down to a color or an integer. You may access the item’s properties through its Properties collection and make changes to the values of the properties. A ModelItem is essentially a wrapper around the designer’s underlying data model. You can access the underlying model through the GetCurrentValue method.

Note

You should never make any serializable changes to an object returned from the GetCurrentValue method. The changes will not be reflected back in the designer’s serialization or undo systems.

Note

Use the invariant culture when setting model item values by using strings.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Model.ModelItem
    Microsoft.Windows.Design.Model.ModelItemCollection
    Microsoft.Windows.Design.Model.ModelItemDictionary

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

ModelItem Members

Microsoft.Windows.Design.Model Namespace

Other Resources

WPF Designer Extensibility Architecture