Home Dashboard Directory Help
Search

Silverlight TextBoxes & Environment.NewLine by polaris408


Status: 

Closed
 as External Help for as External


0
0
Sign in
to vote
Type: Bug
ID: 419751
Opened: 3/1/2009 4:01:07 PM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

The newline string in Silverlight text boxes is not the same as Environment.NewLine.
Details
Sign in to post a comment.
Posted by Microsoft on 5/6/2009 at 8:52 PM
Thank you for your post. This is by design. TextBox does not attempt to change its content model based upon the OS so it always uses \r for newline.
Posted by polaris408 on 4/2/2009 at 3:39 PM
Can we update the MSDN documentation to make a note of this? Thanks.
Posted by Microsoft on 4/2/2009 at 12:06 PM
Thank you for your post. This is by design. TextBox does not attempt to change its content model based upon the OS so it always uses \r for newline.

-mark
Posted by Microsoft on 3/1/2009 at 6:22 PM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Sign in to post a workaround.
Posted by Sujit Singh on 6/11/2010 at 4:24 PM
Convert into string array as

YourTextBox.Text.Split(Environment.NewLine.ToCharArray())

and then join whereever you want with Environment.NewLine.