TextBox.IsReadOnly TextBox.IsReadOnly TextBox.IsReadOnly TextBox.IsReadOnly Property


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

public : Platform::Boolean IsReadOnly { get; set; }
bool IsReadOnly();

void IsReadOnly(bool isreadonly);
public bool IsReadOnly { get; set; }
Public ReadWrite Property IsReadOnly As bool
<TextBox IsReadOnly="bool"/>

Property Value

bool bool

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


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.

See also