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
Active4 years, 11 months ago
I am trying to add a line of text to a TextBox component in VB.net, but I cannot figure out for the life of me how to force a new line. Right now it just adds onto what I have already, and that is. Oct 01, 2006 Is there a way to create a newline in a text box? I have tried 'n' but this doen't work in a text box. Thanks, Make sure that the TextBox’s Multiline property is set to true before trying to add new line characters. As for the newline character(s) themselves. In Windows rn is the proper string however you should think about using Environment.
but with no success.
ctacke
62.4k1414 gold badges8888 silver badges145145 bronze badges
2,07788 gold badges3434 silver badges6969 bronze badges
4 Answers
Windows uses
rn for line breaks, not r , but that's irrelevant; use Environment.NewLine instead.
Also, per the docs:
true if the ENTER key creates a new line of text in a multiline version of the control; false if the ENTER key activates the default button for the form. The default is false.
EDIT: Ahhh, WP7.. here is an article I found which attempts to create a multi-line textbox in WP7.
Ed S.Ed S.
106k1919 gold badges158158 silver badges232232 bronze badges
Environment.NewLine if its the same as normal development.
GageGage
5,69888 gold badges3838 silver badges7676 bronze badges
Windows Form Textbox New Line 2016
just add below scope to xaml code:
something like this:
FSystemFSystem
I'm not familiar with WP7 but Windows in general uses '
rn ' (i.e. both chars one after the other) to signify a line break.
If you append both to your text, does it solve your problem?
Having said that, I'm surprised that typed line breaks are being removed from the textbox. When you say the text isn't viewable on the server, what do you mean? Is it that the text isn't sent to and / or recorded on the server or that your method of display on the server isn't showing it? Download pink panther game for pc full version.
Bob SammersBob Sammers
Html Form TextboxNot the answer you're looking for? Browse other questions tagged c#silverlightwindows-phone-7textboxline-breaks or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |