ModelItem Class

Represents the main base object in which the model (code and data) is created. The objects that own the ModelItem object is responsible for disposing of it.

  public class ModelItem : IModelItem, IPropertyObject, IModelItemOwner, IDisposable

Public Instance Constructors

Constructor Description
ModelItem() Initializes a new instance of the ModelItem class.
ModelItem(IModelItemOwner) Initializes a new instance of the ModelItem class.
ModelItem(IModelItemOwner, string) Initializes a new instance of the ModelItem class.

Public Instance Methods

Method Description
BindFromSource Creates a binding from a source object.
BindToTarget Creates a binding to a target.
Dispose Disposes the ModelItem object, optionally unregistering it from its owner beforehand.
ToString Converts the object to a human-readable string.
TwoWayBind Creates a two-way binding.

Protected Instance Methods

Method Description
Dispose Releases all the resources used by ModelItem.
FirePropertyChanged Raises the PropertyChanged event for a property that has changed.
OnOwnerChanged Notifies derived classes when the owner changes.
OnPropertyChanged Notifies derived classes when a property changes.
RaiseEvent Invoke the event handler for a specified property.

Public Instance Properties

Property Description
Data Gets the data for the ModelItem object.
Description Gets or sets the description of the current ModelItem object.
IsDisposed Gets a value that indicates whether the ModelItem object is disposed.
Owner Gets or sets the owner of the ModelItem object. The owner is responsible for disposing this object.
Selected Gets a value that indicates whether the ModelItem object is selected.
UniqueId Gets or sets the unique identifier of this ModelItem object.

Public Instance Events

Event Description
PropertyChanged Raised when a property has changed.

Requirements

Reference: Microsoft.MediaCenter.UI

Namespace: Microsoft.MediaCenter.UI

Assembly: Microsoft.MediaCenter.UI.dll

Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later

See Also