Gets or sets the value that determines if the user can change the text in the text box.
Public Property IsReadOnly As Boolean
< TextBox IsReadOnly = " bool " />
System .Boolean if the text box is read-only; otherwise, true . The default is false . 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
and KeyUp events are marked as handled. KeyDown
The following code snippet displays a read-only text box.
< TextBlock Margin = " 20,20,0,0 " Text = " Read Only TextBox " />
< TextBox x:Name = " ReadOnlyTB " IsReadOnly = " True " HorizontalAlignment = " Left " Margin = " 20,5,0,0 " Height = " 35 " Width = " 200 " />
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Did you find this helpful?
( 1500 characters remaining)
Thank you for your feedback