How can I get a linebreak in TextBox in WP7? I’m developing social-based app(like facebook) and if I set AcceptReturn=true, it gives me a visual(ui) linebreak, but when I send this text to the server I can see that there is no linebreak. Please help me with this problem. I’ve tried
void whatsend_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) {
if (e.Key == Key.Enter) {
whatsend.Text +="\r";//or /n,
}
}
but with no success.
Windows uses
\r\nfor line breaks, not\r, but that’s irrelevant; useEnvironment.NewLineinstead.Also, per the docs:
Did you set
MultiLinetotrue?EDIT: Ahhh, WP7… here is an article I found which attempts to create a multi-line textbox in WP7.