In This Article

CachedPropertyModelBase Class

Provides an abstract base class for a property grid property IDataModel that caches the values returned as an optimization.

public abstract class CachedPropertyModelBase : PropertyModelBase, IPropertyModel, IDataModel, IDisposable
Inheritance:
object ObservableObjectBase DataModelBase PropertyModelBase object
Derived:
MergedPropertyModel PropertyDescriptorPropertyModel
Implements:
IPropertyModel IDataModel IDisposable

Constructors

CachedPropertyModelBase()

Initializes an instance of the class.

protected CachedPropertyModelBase()

Properties

CanAddChild

Indicates whether a new child can be added to an associated collection/parent.

public override bool CanAddChild { get; }

Property Value

bool:

true if a new child can be added to an associated collection/parent; otherwise, false.

CanAddChildCore

Indicates whether a new child can be added to an associated collection/parent.

protected virtual bool CanAddChildCore { get; }

Property Value

bool:

true if a new child can be added to an associated collection/parent; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

CanRemove

Indicates whether the property can be removed from an associated collection/parent.

public override bool CanRemove { get; }

Property Value

bool:

true if the property can be removed from an associated collection/parent; otherwise, false.

CanRemoveCore

Indicates whether the property can be removed from an associated collection/parent.

protected virtual bool CanRemoveCore { get; }

Property Value

bool:

true if the property can be removed from an associated collection/parent; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

CanResetValue

Indicates whether the property can be reset to its default value.

public override bool CanResetValue { get; }

Property Value

bool:

true if the property can be reset to its default value; otherwise, false.

CanResetValueCore

Indicates whether the property can be reset to its default value.

protected abstract bool CanResetValueCore { get; }

Property Value

bool:

true if the property can be reset to its default value; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

Category

Gets a category for the property.

public override string? Category { get; }

Property Value

string:

A category for the property.

CategoryCore

A category for the property.

protected virtual string? CategoryCore { get; }

Property Value

string

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

Converter

The TypeConverter to use for the property.

public override TypeConverter? Converter { get; }

Property Value

TypeConverter

ConverterCore

The TypeConverter to use for the property.

protected virtual TypeConverter? ConverterCore { get; }

Property Value

TypeConverter

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

Description

The description of the data model, often displayed in a summary area or a tooltip.

public virtual string? Description { get; }

Property Value

string

DescriptionCore

The description of the data model, often displayed in a summary area or a tooltip.

protected virtual string? DescriptionCore { get; }

Property Value

string

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

DescriptionResolved

The resolved description of the data model, often displayed in a summary area or a tooltip.

protected override sealed string? DescriptionResolved { get; }

Property Value

string

DisplayName

The name to use when displaying the data model, often the same as Name.

public virtual string? DisplayName { get; }

Property Value

string

DisplayNameCore

The name to use when displaying the data model, often the same as Name.

protected virtual string? DisplayNameCore { get; }

Property Value

string

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

DisplayNameResolved

The name to use when displaying the data model, often the same as Name.

protected override sealed string? DisplayNameResolved { get; }

Property Value

string

HasStandardValues

Indicates whether the property supports StandardValues.

public override bool HasStandardValues { get; }

Property Value

bool:

true if the property supports StandardValues; otherwise, false.

HasStandardValuesCore

Indicates whether the property supports StandardValues.

protected virtual bool HasStandardValuesCore { get; }

Property Value

bool:

true if the property supports StandardValues; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

IsImmutable

Indicates whether the Value's child properties, if any, are capable of being edited.

public override bool IsImmutable { get; }

Property Value

bool:

true if the Value's child properties, if any, are capable of being edited; otherwise, false.

IsImmutableCore

Indicates whether the Value's child properties, if any, are capable of being edited.

protected virtual bool IsImmutableCore { get; }

Property Value

bool:

true if the Value's child properties, if any, are capable of being edited; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

IsLimitedToStandardValues

Indicates whether the Value property can only be set to one of the values defined by the StandardValues property.

public override bool IsLimitedToStandardValues { get; }

Property Value

bool:

true if the Value property can only be set to one of the values defined by the StandardValues property; otherwise, false.

IsLimitedToStandardValuesCore

Indicates whether the Value property can only be set to one of the values defined by the StandardValues property.

protected virtual bool IsLimitedToStandardValuesCore { get; }

Property Value

bool:

true if the Value property can only be set to one of the values defined by the StandardValues property; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

IsMergeable

Indicates whether the property can be merged when presenting multiple objects.

public override bool IsMergeable { get; }

Property Value

bool:

true if the property can be merged when presenting multiple objects; otherwise, false.

IsMergeableCore

Indicates whether the property can be merged when presenting multiple objects.

protected abstract bool IsMergeableCore { get; }

Property Value

bool:

true if the property can be merged when presenting multiple objects; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

IsModified

Indicates whether the data model has been modified.

public virtual bool IsModified { get; }

Property Value

bool:

true if the data model has been modified; otherwise, false.

IsModifiedCore

Indicates whether the data model has been modified.

protected abstract bool IsModifiedCore { get; }

Property Value

bool:

true if the data model has been modified; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

IsModifiedResolved

Indicates whether the data model has been modified.

protected override sealed bool IsModifiedResolved { get; }

Property Value

bool:

true if the data model has been modified; otherwise, false.

IsValueReadOnly

Indicates whether the Value property is read-only.

public override bool IsValueReadOnly { get; set; }

Property Value

bool:

true if the Value property is read-only; otherwise, false.

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.

IsValueReadOnlyCore

Indicates whether the Value property is read-only.

protected abstract bool IsValueReadOnlyCore { get; }

Property Value

bool:

true if the Value property is read-only; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

Name

The name of the data model.

public virtual string? Name { get; }

Property Value

string

NameCore

The name of the data model.

protected abstract string? NameCore { get; }

Property Value

string

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

NameResolved

The resolved name of the data model.

protected override sealed string? NameResolved { get; }

Property Value

string

NameTemplate

The DataTemplate to use for showing the property display name.

public override DataTemplate? NameTemplate { get; }

Property Value

DataTemplate

Remarks

The priority order of value template specification is NameTemplate, NameTemplateSelector, NameTemplateKey, and finally any name templates in matching property editors.

NameTemplateCore

The DataTemplate to use for showing the property display name.

protected virtual DataTemplate? NameTemplateCore { get; }

Property Value

DataTemplate

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

NameTemplateKey

The resource key that references a DataTemplate to use for showing the property display name.

public override object? NameTemplateKey { get; }

Property Value

object

Remarks

The priority order of value template specification is NameTemplate, NameTemplateSelector, NameTemplateKey, and finally any name templates in matching property editors.

NameTemplateKeyCore

The resource key that references a DataTemplate to use for showing the property display name.

protected virtual object? NameTemplateKeyCore { get; }

Property Value

object

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

NameTemplateSelector

The DataTemplateSelector to use for showing the property display name.

public override DataTemplateSelector? NameTemplateSelector { get; }

Property Value

DataTemplateSelector

Remarks

The priority order of value template specification is NameTemplate, NameTemplateSelector, NameTemplateKey, and finally any name templates in matching property editors.

NameTemplateSelectorCore

The DataTemplateSelector to use for showing the property display name.

protected virtual DataTemplateSelector? NameTemplateSelectorCore { get; }

Property Value

DataTemplateSelector

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

ShouldNotifyParentOnValueChange

Indicates whether the property should notify its parent property when the Value changes.

public override bool ShouldNotifyParentOnValueChange { get; }

Property Value

bool:

true if the property should notify its parent property when the Value changes; otherwise, false.

ShouldNotifyParentOnValueChangeCore

Indicates whether the property should notify its parent property when the Value changes.

protected virtual bool ShouldNotifyParentOnValueChangeCore { get; }

Property Value

bool:

true if the property should notify its parent property when the Value changes; otherwise, false.

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

SortImportance

A DataModelSortImportance that indicates the sort importance of this data model.

public virtual DataModelSortImportance SortImportance { get; }

Property Value

DataModelSortImportance

SortImportanceCore

A DataModelSortImportance that indicates the sort importance of this data model.

protected virtual DataModelSortImportance SortImportanceCore { get; }

Property Value

DataModelSortImportance

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

SortImportanceResolved

A resolved DataModelSortImportance that indicates the sort importance of this data model.

protected override sealed DataModelSortImportance SortImportanceResolved { get; }

Property Value

DataModelSortImportance

SortOrder

A numeric sort order for sorting the data model within other data models of the same sort importance.

public virtual int SortOrder { get; }

Property Value

int

SortOrderCore

A numeric sort order for sorting the data model within other data models of the same sort importance.

protected virtual int SortOrderCore { get; }

Property Value

int

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

SortOrderResolved

A resolved numeric sort order for sorting the data model within other data models of the same sort importance.

protected override sealed int SortOrderResolved { get; }

Property Value

int

StandardValues

The standard list of values for the Value property.

public override IEnumerable? StandardValues { get; }

Property Value

IEnumerable

StandardValuesAsStrings

The standard list of values for the ValueAsString property as a list of strings.

public override IEnumerable<string>? StandardValuesAsStrings { get; }

Property Value

IEnumerable<string>

StandardValuesAsStringsCore

The standard list of values for the ValueAsString property as a list of strings.

protected virtual IEnumerable<string>? StandardValuesAsStringsCore { get; }

Property Value

IEnumerable<string>

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

StandardValuesCore

The standard list of values for the Value property.

protected virtual IEnumerable? StandardValuesCore { get; }

Property Value

IEnumerable

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

Target

The target object that owns the property.

public override object? Target { get; }

Property Value

object

TargetCore

The target object that owns the property.

protected abstract object? TargetCore { get; }

Property Value

object

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

Value

The property value.

public override object? Value { get; set; }

Property Value

object

ValueAsString

The property value in a string representation.

public override string? ValueAsString { get; set; }

Property Value

string

ValueAsStringCore

The property value in a string representation.

protected virtual string? ValueAsStringCore { get; set; }

Property Value

string

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

ValueCore

The property value.

protected abstract object? ValueCore { get; set; }

Property Value

object

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

ValueTemplate

The DataTemplate to use for editing the property value.

public override DataTemplate? ValueTemplate { get; }

Property Value

DataTemplate

Remarks

The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, ValueTemplateKind, and finally any value templates in matching property editors.

ValueTemplateCore

The DataTemplate to use for use for editing the property value.

protected virtual DataTemplate? ValueTemplateCore { get; }

Property Value

DataTemplate

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

ValueTemplateKey

The resource key that references a DataTemplate to use for editing the property value.

public override object? ValueTemplateKey { get; }

Property Value

object

Remarks

The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, ValueTemplateKind, and finally any value templates in matching property editors.

ValueTemplateKeyCore

The resource key that references a DataTemplate to use for editing the property value.

protected virtual object? ValueTemplateKeyCore { get; }

Property Value

object

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

ValueTemplateKind

The DefaultValueTemplateKind that specifies a default value cell template to use for editing the property value.

public override DefaultValueTemplateKind ValueTemplateKind { get; }

Property Value

DefaultValueTemplateKind

Remarks

The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, ValueTemplateKind, and finally any value templates in matching property editors.

ValueTemplateKindCore

The DefaultValueTemplateKind that specifies a default value cell template to use for editing the property value.

protected virtual DefaultValueTemplateKind ValueTemplateKindCore { get; }

Property Value

DefaultValueTemplateKind

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

ValueTemplateSelector

The DataTemplateSelector to use for editing the property value.

public override DataTemplateSelector? ValueTemplateSelector { get; }

Property Value

DataTemplateSelector

Remarks

The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, ValueTemplateKind, and finally any value templates in matching property editors.

ValueTemplateSelectorCore

The DataTemplateSelector to use for use for editing the property value.

protected virtual DataTemplateSelector? ValueTemplateSelectorCore { get; }

Property Value

DataTemplateSelector

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

ValueType

The Type of the Value property.

public override Type? ValueType { get; }

Property Value

Type

ValueTypeCore

The Type of the Value property.

protected abstract Type? ValueTypeCore { get; }

Property Value

Type

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

Values

The property values, of which there will only be more than one if this is a merged property.

public override IList<object?>? Values { get; }

Property Value

IList<object>

ValuesCore

The property values, of which there will only be more than one if this is a merged property.

protected virtual IList<object?>? ValuesCore { get; }

Property Value

IList<object>

Remarks

This property does the actual work of retrieving the value for the cached version of this property.

Methods

OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event.

protected override void OnPropertyChanged(PropertyChangedEventArgs e)
Parameter Type Description
e PropertyChangedEventArgs

The event data.

Inherited Members

Extension Methods