Home > DeveloperSection > Interviews > How can I make TextBox support multiple lines of text?

Posted on    March-12-2011 12:00 AM

 WPF WPF 
Ratings:
 1 Answer(s)
  1695  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Points:2550
Posted on    March-12-2011 1:00 AM

Setting AcceptsReturn to true allows users to press the Enter key to create a new line of
text. Note that TextBox always supports multiple lines of text programmatically. If its Text is
set to a string containing NewLine characters, it displays the multiple lines regardless of the
value of AcceptsReturn. Also, the multiline support is completely independent from text
wrapping. Text wrapping only applies to individual lines of text that are wider than the
TextBox.


Don't want to miss updates? Please click the below button!

Follow MindStick