---
title: "How can I make TextBox support multiple lines of text?"  
description: "How can I make TextBox support multiple lines of text?"  
author: "Anonymous User"  
published: 2011-03-12  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/405/how-can-i-make-textbox-support-multiple-lines-of-text  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# How can I make TextBox support multiple lines of text?

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.

## Answers

### Answer by Anonymous User

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.


---

Original Source: https://www.mindstick.com/interview/405/how-can-i-make-textbox-support-multiple-lines-of-text

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
