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

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

public virtual bool CanAddChild { get; }

Property Value

bool:

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

CanAddChildCore

Gets 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.

CanAddChildResolved

Gets the resolved value for whether a new child can be added to an associated collection/parent.

protected override sealed bool CanAddChildResolved { get; }

Property Value

bool:

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

CanRemove

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

public virtual bool CanRemove { get; }

Property Value

bool:

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

CanRemoveCore

Gets 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.

CanRemoveResolved

Gets the resolved value for whether the property can be removed from an associated collection/parent.

protected override sealed bool CanRemoveResolved { get; }

Property Value

bool:

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

CanResetValue

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

public virtual bool CanResetValue { get; }

Property Value

bool:

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

CanResetValueCore

Gets 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.

CanResetValueResolved

Gets the resolved value for whether the property can be reset to its default value.

protected override sealed bool CanResetValueResolved { get; }

Property Value

bool:

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

Category

Gets a category for the property.

public virtual string Category { get; }

Property Value

string:

A category for the property.

CategoryCore

Gets a category for the property.

protected virtual string CategoryCore { get; }

Property Value

string:

A category for the property.

Remarks

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

Converter

Gets the TypeConverter to use for the property.

public virtual TypeConverter Converter { get; }

Property Value

TypeConverter:

The TypeConverter to use for the property.

ConverterCore

Gets the TypeConverter to use for the property.

protected virtual TypeConverter ConverterCore { get; }

Property Value

TypeConverter:

The TypeConverter to use for the property.

Remarks

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

ConverterResolved

Gets the resolved TypeConverter to use for the property.

protected override sealed TypeConverter ConverterResolved { get; }

Property Value

TypeConverter:

The TypeConverter to use for the property.

Description

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

public virtual string Description { get; }

Property Value

string:

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

DescriptionCore

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

protected virtual string DescriptionCore { get; }

Property Value

string:

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

Remarks

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

DescriptionResolved

Gets 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:

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

DisplayName

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

public virtual string DisplayName { get; }

Property Value

string:

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

DisplayNameCore

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

protected virtual string DisplayNameCore { get; }

Property Value

string:

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

Remarks

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

DisplayNameResolved

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

protected override sealed string DisplayNameResolved { get; }

Property Value

string:

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

HasStandardValues

Gets whether the property supports StandardValues.

public override bool HasStandardValues { get; }

Property Value

bool:

true if the property supports StandardValues; otherwise, false.

HasStandardValuesCore

Gets 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

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

public virtual bool IsImmutable { get; }

Property Value

bool:

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

IsImmutableCore

Gets 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.

IsImmutableResolved

Gets the resolved value for whether the Value's child properties, if any, are capable of being edited.

protected override sealed bool IsImmutableResolved { get; }

Property Value

bool:

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

IsLimitedToStandardValues

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

public virtual 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

Gets 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

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

public virtual bool IsMergeable { get; }

Property Value

bool:

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

IsMergeableCore

Gets 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

Gets 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

Gets 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

Gets 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

Gets or sets whether the Value property is read-only.

public virtual 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

Gets 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.

IsValueReadOnlyResolved

Gets the resolved value for whether the Value property is read-only.

protected override sealed bool IsValueReadOnlyResolved { get; }

Property Value

bool:

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

Name

Gets the name of the data model.

public virtual string Name { get; }

Property Value

string:

The name of the data model.

NameCore

Gets the name of the data model.

protected abstract string NameCore { get; }

Property Value

string:

The name of the data model.

Remarks

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

NameResolved

Gets the resolved name of the data model.

protected override sealed string NameResolved { get; }

Property Value

string:

The resolved name of the data model.

NameTemplate

Gets the DataTemplate to use for showing the property display name.

public virtual DataTemplate NameTemplate { get; }

Property Value

DataTemplate:

The DataTemplate to use for showing the property display name.

Remarks

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

NameTemplateCore

Gets the DataTemplate to use for showing the property display name.

protected virtual DataTemplate NameTemplateCore { get; }

Property Value

DataTemplate:

The DataTemplate to use for showing the property display name.

Remarks

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

NameTemplateKey

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

public virtual object NameTemplateKey { get; }

Property Value

object:

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

Remarks

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

NameTemplateKeyCore

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

protected virtual object NameTemplateKeyCore { get; }

Property Value

object:

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

Remarks

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

NameTemplateSelector

Gets the DataTemplateSelector to use for showing the property display name.

public virtual DataTemplateSelector NameTemplateSelector { get; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for showing the property display name.

Remarks

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

NameTemplateSelectorCore

Gets the DataTemplateSelector to use for showing the property display name.

protected virtual DataTemplateSelector NameTemplateSelectorCore { get; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for showing the property display name.

Remarks

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

ShouldNotifyParentOnValueChange

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

public virtual bool ShouldNotifyParentOnValueChange { get; }

Property Value

bool:

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

ShouldNotifyParentOnValueChangeCore

Gets 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.

ShouldNotifyParentOnValueChangeResolved

Gets the resolved value for whether the property should notify its parent property when the Value changes.

protected override sealed bool ShouldNotifyParentOnValueChangeResolved { get; }

Property Value

bool:

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

SortImportance

Gets a DataModelSortImportance that indicates the sort importance of this data model.

public virtual DataModelSortImportance SortImportance { get; }

Property Value

DataModelSortImportance:

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

SortImportanceCore

Gets a DataModelSortImportance that indicates the sort importance of this data model.

protected virtual DataModelSortImportance SortImportanceCore { get; }

Property Value

DataModelSortImportance:

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

Remarks

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

SortImportanceResolved

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

protected override sealed DataModelSortImportance SortImportanceResolved { get; }

Property Value

DataModelSortImportance:

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

SortOrder

Gets 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:

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

SortOrderCore

Gets 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:

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

Remarks

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

SortOrderResolved

Gets 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:

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

StandardValues

Gets the standard list of values for the Value property.

public virtual IEnumerable StandardValues { get; }

Property Value

IEnumerable:

The standard list of values for the Value property.

StandardValuesAsStrings

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

public virtual IEnumerable<string> StandardValuesAsStrings { get; }

Property Value

IEnumerable<string>:

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

StandardValuesAsStringsCore

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

protected virtual IEnumerable<string> StandardValuesAsStringsCore { get; }

Property Value

IEnumerable<string>:

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

Remarks

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

StandardValuesCore

Gets the standard list of values for the Value property.

protected virtual IEnumerable StandardValuesCore { get; }

Property Value

IEnumerable:

The standard list of values for the Value property.

Remarks

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

StandardValuesResolved

Gets the resolved standard list of values for the Value property.

protected override sealed IEnumerable StandardValuesResolved { get; }

Property Value

IEnumerable:

The standard list of values for the Value property.

Target

Gets the target object that owns the property.

public virtual object Target { get; }

Property Value

object:

The target object that owns the property.

TargetCore

Gets the target object that owns the property.

protected abstract object TargetCore { get; }

Property Value

object:

The target object that owns the property.

Remarks

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

TargetResolved

Gets the resolved target object that owns the property.

protected override sealed object TargetResolved { get; }

Property Value

object:

The target object that owns the property.

TargetType

Gets the Type of the Target property.

public virtual Type TargetType { get; }

Property Value

Type:

The Type of the Target property.

Value

Gets or sets the property value.

public virtual object Value { get; set; }

Property Value

object:

The property value.

ValueAsString

Gets or sets the property value in a string representation.

public virtual string ValueAsString { get; set; }

Property Value

string:

The property value in a string representation.

ValueAsStringCore

Gets or sets the property value in a string representation.

protected virtual string ValueAsStringCore { get; set; }

Property Value

string:

The property value in a string representation.

Remarks

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

ValueCore

Gets or sets the property value.

protected abstract object ValueCore { get; set; }

Property Value

object:

The property value.

Remarks

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

ValueResolved

Gets or sets the resolved property value.

protected override sealed object ValueResolved { get; set; }

Property Value

object:

The property value.

ValueTemplate

Gets the DataTemplate to use for editing the property value.

public virtual DataTemplate ValueTemplate { get; }

Property Value

DataTemplate:

The DataTemplate to use for editing the property value.

ValueTemplateCore

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

protected virtual DataTemplate ValueTemplateCore { get; }

Property Value

DataTemplate:

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

Remarks

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

ValueTemplateKey

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

public virtual object ValueTemplateKey { get; }

Property Value

object:

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

Remarks

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

ValueTemplateKeyCore

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

protected virtual object ValueTemplateKeyCore { get; }

Property Value

object:

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

Remarks

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

ValueTemplateKind

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

public virtual DefaultValueTemplateKind ValueTemplateKind { get; }

Property Value

DefaultValueTemplateKind:

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

Remarks

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

ValueTemplateKindCore

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

protected virtual DefaultValueTemplateKind ValueTemplateKindCore { get; }

Property Value

DefaultValueTemplateKind:

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

Remarks

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

ValueTemplateSelector

Gets the DataTemplateSelector to use for editing the property value.

public virtual DataTemplateSelector ValueTemplateSelector { get; }

Property Value

DataTemplateSelector:

The DataTemplate to use for editing the property value.

Remarks

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

ValueTemplateSelectorCore

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

protected virtual DataTemplateSelector ValueTemplateSelectorCore { get; }

Property Value

DataTemplateSelector:

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

Remarks

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

ValueType

Gets the Type of the Value property.

public virtual Type ValueType { get; }

Property Value

Type:

The Type of the Value property.

Remarks

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

ValueTypeCore

Gets the Type of the Value property.

protected abstract Type ValueTypeCore { get; }

Property Value

Type:

The Type of the Value property.

Remarks

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

ValueTypeResolved

Gets the resolved Type of the Value property.

protected override sealed Type ValueTypeResolved { get; }

Property Value

Type:

The Type of the Value property.

Values

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

public virtual IList<object> Values { get; }

Property Value

IList<object>:

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

ValuesCore

Gets 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>:

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

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 PropertyChangedEventArgs that contains the event data.

Inherited Members