Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to make non editable textbox in wpf.
when i debug it has to be some non editable text
Posted

Add IsReadOnly = "True" in xaml of textbox.
 
Share this answer
 
v2
Comments
Wayne Gaylard 30-Jun-11 5:07am    
Good answer, but I think the OP should use a Label instead. Just a case of using the right tool for the job sort of thing. +5
Use a Label. That's what a Label is for. A textbox is for user input.
 
Share this answer
 
Prerak and Wayne have answered your question very well, just to add to that :

1. Everything you can do with a text box in WPF[^]
2. Read only Text Box[^]

Hope you find this helpful.
All the best.
 
Share this answer
 
v2
Having a non editable text box is good when you want to allow the contents to be copied.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900