In This Article

PropertyEditor Class

Provides information used for displaying and manipulating a property value in a property grid.

public class PropertyEditor : ObservableObjectBase
Inheritance:
object ObservableObjectBase object
Derived:
PropertyEditorBase BooleanPropertyEditor BrushPropertyEditor ColorPropertyEditor ExtendedStringPropertyEditor FontFamilyPropertyEditor FontStretchPropertyEditor FontStylePropertyEditor FontWeightPropertyEditor LimitedObjectPropertyEditor LimitedStringPropertyEditor NullableBooleanPropertyEditor StringPropertyEditor SuggestedStringPropertyEditor

Constructors

PropertyEditor()

Initializes an instance of the class.

public PropertyEditor()

PropertyEditor(DefaultValueTemplateKind)

Initializes an instance of the class for the specified kind of value template.

protected PropertyEditor(DefaultValueTemplateKind valueTemplateKind)
Parameter Type Description
valueTemplateKind DefaultValueTemplateKind

Properties

NameTemplate

The DataTemplate to use for showing the property display name.

public virtual DataTemplate? NameTemplate { get; set; }

Property Value

DataTemplate

Remarks

The priority order of name template specification is NameTemplate, NameTemplateSelector, and finally NameTemplateKey.

NameTemplateKey

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

public virtual object? NameTemplateKey { get; set; }

Property Value

object

Remarks

The priority order of name template specification is NameTemplate, NameTemplateSelector, and finally NameTemplateKey.

NameTemplateSelector

The DataTemplateSelector to use for showing the property display name.

public virtual DataTemplateSelector? NameTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Remarks

The priority order of name template specification is NameTemplate, NameTemplateSelector, and finally NameTemplateKey.

ObjectType

The type of the data object that contains the property.

public Type? ObjectType { get; set; }

Property Value

Type

PropertyName

The name of the property.

public string? PropertyName { get; set; }

Property Value

string

PropertyType

The type of the property.

public Type? PropertyType { get; set; }

Property Value

Type

ValueTemplate

The DataTemplate to use for editing the property value.

public virtual DataTemplate? ValueTemplate { get; set; }

Property Value

DataTemplate

Remarks

The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, and finally ValueTemplateKind.

ValueTemplateKey

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

public virtual object? ValueTemplateKey { get; set; }

Property Value

object

Remarks

The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, and finally ValueTemplateKind.

ValueTemplateKind

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

public virtual DefaultValueTemplateKind ValueTemplateKind { get; set; }

Property Value

DefaultValueTemplateKind

Remarks

The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, and finally ValueTemplateKind.

ValueTemplateSelector

The DataTemplateSelector to use for editing the property value.

public virtual DataTemplateSelector? ValueTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Remarks

The priority order of value template specification is ValueTemplate, ValueTemplateSelector, ValueTemplateKey, and finally ValueTemplateKind.

Methods

GetIsReadOnly(IPropertyModel)

Returns whether the specified IPropertyModel should be optionally forced read-only or not, directly affecting the IsReadOnly result.

protected virtual bool? GetIsReadOnly(IPropertyModel propertyModel)
Parameter Type Description
propertyModel IPropertyModel

The IPropertyModel to examine.

Returns

bool?:

true if the property model should be read-only. false if the property model should not be read-only. null to allow default logic for determining read-only state to execute.

Remarks

Do not call IsReadOnly from within this method, since the getter for that property calls into this method as part of its default logic.

Inherited Members

Extension Methods