IDataModel Interface
Provides the requirements for a data model class that can represent a property or category in a property grid.
public interface IDataModel : IDisposable
Properties
CanAutoDispose
Indicates whether the data model should be automatically disposed when it is removed from a parent data model.
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.
Description
The description of the data model, often displayed in a summary area or a tooltip.
DisplayName
The name to use when displaying the data model, often the same as Name.
IsExpanded
Indicates whether the data model is expanded.
bool IsExpanded { get; set; }
Property Value
- bool:
trueif the data model is expanded; otherwise,false.
IsInitialized
Indicates whether the data model has been initialized.
bool IsInitialized { get; set; }
Property Value
- bool:
trueif the data model has been initialized; otherwise,false.
IsModified
Indicates whether the data model has been modified.
bool IsModified { get; }
Property Value
- bool:
trueif the data model has been modified; otherwise,false.
IsRoot
Indicates whether the data model is the root.
IsSelected
Indicates whether the data model is selected.
bool IsSelected { get; set; }
Property Value
- bool:
trueif the data model is selected; otherwise,false.
Name
The name of the data model.
Parent
The parent data model.
IDataModel? Parent { get; set; }
Property Value
Remarks
Do not set this property directly, as it will be set when a data model is added as a child of another data model.
SortComparer
The DataModelSortComparer to use for sorting this data model's children.
DataModelSortComparer? SortComparer { get; set; }
Property Value
Remarks
If this property doesn't return anything, the default SortComparer will be used.
SortImportance
A DataModelSortImportance that indicates the sort importance of this data model.
SortOrder
A numeric sort order for sorting the data model within other data models of the same sort importance.
Tag
Custom data for the data model.