IValueProvider.IsReadOnly Property

Definition

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

public:
 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.

Examples

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
{
    get
    {
        return false;
    }
}
''' <summary>
''' Specifies whether the custom control is read only.
''' </summary>
Private ReadOnly Property IsReadOnly() As Boolean Implements IValueProvider.IsReadOnly
    Get
        Return False
    End Get
End Property

Remarks

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

Applies to