IValueProvider.IsReadOnly IValueProvider.IsReadOnly IValueProvider.IsReadOnly IValueProvider.IsReadOnly Property


Gets a value that specifies whether the value of a control is read-only.

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

Property Value

true if the value is read-only; false if it can be modified.


The following example shows an implementation of this method for a control that allows its value to be changed.

/// <summary>
/// Specifies whether the custom control is read only.
/// </summary>
bool IValueProvider.IsReadOnly
        return false;
''' <summary>
''' Specifies whether the custom control is read only.
''' </summary>
Private ReadOnly Property IsReadOnly() As Boolean Implements IValueProvider.IsReadOnly
        Return False
    End Get
End Property


A control should have its IsEnabledProperty set to true and its IsReadOnlyProperty set to false before allowing a call to SetValue.

Applies to