Share via


IValueProvider.IsReadOnly Özellik

Tanım

Bir denetimin değerinin salt okunur olup olmadığını belirten bir değer alır.

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

Özellik Değeri

true değer salt okunursa; false değiştirilebilirse.

Örnekler

Aşağıdaki örnekte, değerinin değiştirilmesine izin veren bir denetim için bu yöntemin uygulanması gösterilmektedir.

/// <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

Açıklamalar

Bir denetimin çağrısına IsEnabledPropertytrue izin vermeden SetValueönce denetimin IsReadOnlyProperty olarak ve olarak ayarlanmış false olması gerekir.

Şunlara uygulanır