In This Article

PropertyDescriptorPropertyModel Class

Represents a property grid property IDataModel that is based on PropertyDescriptor data.

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

Constructors

PropertyDescriptorPropertyModel(object, PropertyDescriptor)

Initializes an instance of the class.

public PropertyDescriptorPropertyModel(object target, PropertyDescriptor propertyDescriptor)
Parameter Type Description
target object

The target object that owns the property.

propertyDescriptor PropertyDescriptor

The PropertyDescriptor for the property be accessed on the target.

Properties

CanRemoveCore

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

protected override 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.

CanResetValueCore

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

protected override 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.

CategoryCore

A category for the property.

protected override string? CategoryCore { get; }

Property Value

string

Remarks

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

ConverterCore

The TypeConverter to use for the property.

protected override TypeConverter? ConverterCore { get; }

Property Value

TypeConverter

Remarks

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

DescriptionCore

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

protected override string? DescriptionCore { get; }

Property Value

string

Remarks

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

DisplayNameCore

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

protected override string? DisplayNameCore { get; }

Property Value

string

Remarks

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

IsImmutableCore

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

protected override 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.

IsMergeableCore

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

protected override 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.

IsModifiedCore

Indicates whether the data model has been modified.

protected override 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.

IsValueReadOnlyCore

Indicates whether the Value property is read-only.

protected override 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.

NameCore

The name of the data model.

protected override string NameCore { get; }

Property Value

string

Remarks

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

PropertyDescriptor

The PropertyDescriptor for the property be accessed on the target object.

public PropertyDescriptor PropertyDescriptor { get; }

Property Value

PropertyDescriptor

ShouldNotifyParentOnValueChangeCore

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

protected override 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.

SortOrderCore

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

protected override int SortOrderCore { get; }

Property Value

int

Remarks

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

TargetCore

The target object that owns the property.

protected override object TargetCore { get; }

Property Value

object

Remarks

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

ValueCore

The property value.

protected override 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.

ValueTypeCore

The Type of the Value property.

protected override Type ValueTypeCore { get; }

Property Value

Type

Remarks

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

Methods

Dispose(bool)

Releases the unmanaged resources used by the object and optionally releases the managed resources.

protected override void Dispose(bool disposing)
Parameter Type Description
disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

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.

Remove()

Removes the property from an associated collection/parent.

public override void Remove()

ResetValue()

Resets the property value to its default value.

public override void ResetValue()

Inherited Members

Extension Methods