IPropertyModel Interface
Provides the requirements for a property grid property IDataModel.
public interface IPropertyModel : IDataModel, IDisposable
Properties
AddChildCommand
The ICommand used to add a new child into to an associated collection/parent.
CanAddChild
Indicates whether a new child can be added to an associated collection/parent.
bool CanAddChild { get; }
Property Value
- bool:
trueif a new child can be added to an associated collection/parent; otherwise,false.
CanRemove
Indicates whether the property can be removed from an associated collection/parent.
bool CanRemove { get; }
Property Value
- bool:
trueif the property can be removed from an associated collection/parent; otherwise,false.
CanResetValue
Indicates whether the property can be reset to its default value.
bool CanResetValue { get; }
Property Value
- bool:
trueif the property can be reset to its default value; otherwise,false.
Category
Gets a category for the property.
Converter
The TypeConverter to use for the property.
HasStandardValues
Indicates whether the property supports StandardValues.
bool HasStandardValues { get; }
Property Value
- bool:
trueif the property supports StandardValues; otherwise,false.
IsHostReadOnly
Indicates whether the host UI control (e.g., a property grid) is read-only.
bool IsHostReadOnly { get; set; }
Property Value
- bool:
trueif the host UI control (e.g., a property grid) is read-only; otherwise,false.
IsImmutable
Indicates whether the Value's child properties, if any, are capable of being edited.
bool IsImmutable { get; }
Property Value
IsLimitedToStandardValues
Indicates whether the Value property can only be set to one of the values defined by the StandardValues property.
bool IsLimitedToStandardValues { get; }
Property Value
- bool:
trueif the Value property can only be set to one of the values defined by the StandardValues property; otherwise,false.
IsMergeable
Indicates whether the property can be merged when presenting multiple objects.
bool IsMergeable { get; }
Property Value
- bool:
trueif the property can be merged when presenting multiple objects; otherwise,false.
IsReadOnly
Indicates whether UI for editing the property value is read-only.
bool IsReadOnly { get; }
Property Value
- bool:
trueif the UI for editing the property value is read-only; otherwise,false.
Remarks
This property is a resolved value of IsHostReadOnly and IsValueReadOnly.
IsValueReadOnly
Indicates whether the Value property is read-only.
bool IsValueReadOnly { get; set; }
Property Value
Remarks
This property can be set to true to force a normally-editable property to be read-only.
Some implementations of this property will always return true when the underlying property value is unable to be set.
NamePropertyEditor
The PropertyEditor, if any, that was used to select the DataTemplate for showing the property display name.
NameTemplate
The DataTemplate to use for showing the property display name.
DataTemplate? NameTemplate { get; }
Property Value
Remarks
The priority order of value template specification is NameTemplate, NameTemplateSelector, NameTemplateKey, and finally any name templates in matching property editors.
NameTemplateKey
The resource key that references a DataTemplate to use for showing the property display name.
object? NameTemplateKey { get; }
Property Value
Remarks
The priority order of value template specification is NameTemplate, NameTemplateSelector, NameTemplateKey, and finally any name templates in matching property editors.
NameTemplateSelector
The DataTemplateSelector to use for showing the property display name.
DataTemplateSelector? NameTemplateSelector { get; }
Property Value
Remarks
The priority order of value template specification is NameTemplate, NameTemplateSelector, NameTemplateKey, and finally any name templates in matching property editors.
RemoveCommand
The ICommand used to remove the property from an associated collection/parent.
ResetValueCommand
The ICommand used to reset the property value to its default value.
ShouldNotifyParentOnValueChange
Indicates whether the property should notify its parent property when the Value changes.
bool ShouldNotifyParentOnValueChange { get; }
Property Value
StandardValues
The standard list of values for the Value property.
StandardValuesAsStrings
The standard list of values for the ValueAsString property as a list of strings.
StandardValuesDisplayMemberPath
The display member path for StandardValues when IsLimitedToStandardValues is true.
StandardValuesSelectedValuePath
The selected value path for StandardValues when IsLimitedToStandardValues is true.
Target
The target object that owns the property.
TargetType
Value
The property value.
ValueAsString
The property value in a string representation.
ValuePropertyEditor
The PropertyEditor, if any, that was used to select the DataTemplate for editing the property value.
ValueTemplate
The DataTemplate to use for editing the property value.
DataTemplate? ValueTemplate { get; }
Property Value
Remarks
The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, ValueTemplateKind, and finally any value templates in matching property editors.
ValueTemplateKey
The resource key that references a DataTemplate to use for editing the property value.
object? ValueTemplateKey { get; }
Property Value
Remarks
The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, ValueTemplateKind, and finally any value templates in matching property editors.
ValueTemplateKind
The DefaultValueTemplateKind that specifies a default value cell template to use for editing the property value.
DefaultValueTemplateKind ValueTemplateKind { get; }
Property Value
Remarks
The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, ValueTemplateKind, and finally any value templates in matching property editors.
ValueTemplateSelector
The DataTemplateSelector to use for editing the property value.
DataTemplateSelector? ValueTemplateSelector { get; }
Property Value
Remarks
The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, ValueTemplateKind, and finally any value templates in matching property editors.
ValueType
Values
The property values, of which there will only be more than one if this is a merged property.
Methods
AddChild()
Adds a new child into to an associated collection/parent.
void AddChild()
CycleToNextStandardValue()
Cycles the property value to the next standard value.
Refresh(PropertyRefreshReason)
Refreshes the property based on the specified reason.
void Refresh(PropertyRefreshReason reason)
| Parameter | Type | Description |
|---|---|---|
| reason | PropertyRefreshReason | The reason the property needs to be refreshed. |
Remove()
Removes the property from an associated collection/parent.
void Remove()
ResetValue()
Resets the property value to its default value.
void ResetValue()
Inherited Members
- IDataModel.CanAutoDispose
- IDataModel.Children
- IDataModel.Description
- IDataModel.DisplayName
- IDataModel.IsExpanded
- IDataModel.IsInitialized
- IDataModel.IsModified
- IDataModel.IsRoot
- IDataModel.IsSelected
- IDataModel.Name
- IDataModel.Parent
- IDataModel.SortComparer
- IDataModel.SortImportance
- IDataModel.SortOrder
- IDataModel.Tag
- IDisposable.Dispose()