IRangeValueProvider.IsReadOnly 属性

定义

获取一个值,该值指定控件的值是否是只读的。

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

属性值

Boolean

如果值为只读,则为 true;如果它可以修改,则为 false

示例

以下示例演示非只读控件的此方法的实现。

/// <summary>
/// Specifies whether the control is read-only.
/// </summary>
public bool IsReadOnly
{
    get 
    { 
        return !(this.customControl.Enabled); 
    }
}
''' <summary>
''' Specifies whether the control is read-only.
''' </summary>
Public ReadOnly Property IsReadOnly() As Boolean Implements IRangeValueProvider.IsReadOnly
    Get
        Return Not(Me.customControl.Enabled)
    End Get
End Property

适用于

另请参阅