DependencyPropertyDescriptor.IsReadOnly Property

Definition

Gets a value indicating whether this property is read-only.

public:
 virtual property bool IsReadOnly { bool get(); };
public override bool IsReadOnly { get; }
member this.IsReadOnly : bool
Public Overrides ReadOnly Property IsReadOnly As Boolean

Property Value

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

Remarks

This property relies on the underlying PropertyDescriptor.

Dependency properties are registered as read-only using particular method calls, and by convention the CLR wrapper properties that are the properties viewed by reflection and the descriptors must also be read-only. However, since this is a convention and not a requirement to compile, you might want to double check the dependency property identifier read-only state. To do this, get the identifier (DependencyProperty) value for this DependencyPropertyDescriptor and then check the value of ReadOnly. Note that the ReadOnly is on the identifier itself, not metadata.

Applies to