DataModelBase Class
Provides an abstract base class for a property grid IDataModel.
public abstract class DataModelBase : ObservableObjectBase, IDataModel, IDisposable
- Inheritance:
- object ObservableObjectBase object
- Implements:
- IDataModel IDisposable
Constructors
DataModelBase()
Initializes an instance of the class.
protected DataModelBase()
Properties
CanAutoDispose
Indicates whether the data model should be automatically disposed when it is removed from a parent data model.
public virtual bool CanAutoDispose { get; }
Property Value
- bool:
trueif the data model should be automatically disposed when it is removed from a parent data model; otherwise,false.
Children
The collection of child data models.
DescriptionResolved
The resolved description of the data model, often displayed in a summary area or a tooltip.
DisplayNameResolved
The name to use when displaying the data model, often the same as Name.
IsExpanded
Indicates whether the data model is expanded.
public bool IsExpanded { get; set; }
Property Value
- bool:
trueif the data model is expanded; otherwise,false.
IsModifiedResolved
Indicates whether the data model has been modified.
protected abstract bool IsModifiedResolved { get; }
Property Value
- bool:
trueif the data model has been modified; otherwise,false.
IsRoot
Indicates whether the data model is the root.
public virtual bool IsRoot { get; }
Property Value
- bool:
trueif the data model is the root; otherwise,false.
IsSelected
Indicates whether the data model is selected.
public bool IsSelected { get; set; }
Property Value
- bool:
trueif the data model is selected; otherwise,false.
NameResolved
The resolved name of the data model.
Parent
The parent data model.
SortComparer
The DataModelSortComparer to use for sorting this data model's children.
public DataModelSortComparer? SortComparer { get; set; }
Property Value
Remarks
If this property doesn't return anything, the default SortComparer will be used.
SortImportanceResolved
A resolved DataModelSortImportance that indicates the sort importance of this data model.
protected abstract DataModelSortImportance SortImportanceResolved { get; }
Property Value
SortOrderResolved
A resolved numeric sort order for sorting the data model within other data models of the same sort importance.
Tag
Custom data for the data model.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by the object and optionally releases the managed resources.
protected virtual void Dispose(bool disposing)
| Parameter | Type | Description |
|---|---|---|
| disposing | bool |
|
Remarks
This method is called by the public Dispose method and the Finalize method.
Dispose invokes this method with the disposing parameter set to true.
Finalize invokes this method with disposing set to false.
~DataModelBase()
Allows an object to attempt to free resources and perform other cleanup operations before the object is reclaimed by garbage collection.
protected ~DataModelBase()
RefreshChildren()
Refreshes the contents of the Children property.
protected virtual void RefreshChildren()
ToString()
Returns the string representation of this object.
Inherited Members
- ObservableObjectBase.NotifyPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.OnPropertyChanging(string)
- ObservableObjectBase.OnPropertyChanging(PropertyChangingEventArgs)
- ObservableObjectBase.SetProperty<T>(ref T, T, string)
- ObservableObjectBase.PropertyChanged
- ObservableObjectBase.PropertyChanging
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()