TextBox.IsReadOnly Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the value that determines if the user can change the text in the text box.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<TextBox IsReadOnly="bool"/>
Property Value
Type: System.Booleantrue if the text box is read-only; otherwise, false. The default is false.
Dependency property identifier field: IsReadOnlyProperty.
If the text box is read-only, no user input or edits are allowed, but programmatic changes can be made. The user can still select text, and the cursor still appears. The KeyUp and KeyDown events are marked as handled.