TextBox.IsReadOnly Property

Definition

Gets or sets the value that determines if the user can change the text in the text box.

C#
public bool IsReadOnly { get; set; }
XAML
<TextBox IsReadOnly="bool"/>

Property Value

Boolean

true if the text box is read-only; otherwise, false. The default is false.

Remarks

The default control template for TextBox has a visual state that tracks whether the TextBox is read-only. If the TextBox is read-only, it appears in a gray color in most themes. This also tracks if Control.IsEnabled is false.

Applies to

Product Versions
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6

See also