The default TextBox
in WPF, once set isEnabled to False , the whole TextBox
is grayed out. I want to protect the TextBox.Text
from being modified and want the TextBox
to remain its style ( ForeGround and Background color). Is there an easy work around to achieve this, other than to write the template to override the TextBox
?
检查或将TextBox的属性IsReadOnly设置为true。
Set IsReadOnly
to true.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.