Export (0) Print
Expand All

DependencyPropertyDescriptor.IsReadOnly Property

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

Namespace:  System.ComponentModel
Assembly:  WindowsBase (in WindowsBase.dll)

public override bool IsReadOnly { get; }

Property Value

Type: System.Boolean
true if the property is read-only; otherwise, false.

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft