TextBoxBase.IsReadOnly TextBoxBase.IsReadOnly TextBoxBase.IsReadOnly TextBoxBase.IsReadOnly Property

定义

获取或设置一个值,该值指示文本编辑控件对于与该控件交互的用户是否是只读的。Gets or sets a value that indicates whether the text editing control is read-only to a user interacting with the control.

public:
 property bool IsReadOnly { bool get(); void set(bool value); };
public bool IsReadOnly { get; set; }
member this.IsReadOnly : bool with get, set
Public Property IsReadOnly As Boolean

属性值

如果文本编辑控件的内容对于用户是只读的,则为 true;否则,用户可以修改文本编辑控件的内容。true if the contents of the text editing control are read-only to a user; otherwise, the contents of the text editing control can be modified by the user. 默认值为 falseThe default value is false.

注解

此值仅影响与控件交互的用户。This value only affects a user who is interacting with the control. 始终可以以编程方式修改文本编辑控件的内容。The contents of a text editing control can always be modified programmatically.

依赖项属性信息Dependency Property Information

标识符字段Identifier field IsReadOnlyProperty
元数据属性设置为trueMetadata properties set to true Inherits

适用于