I fill a TextBox with multiple lines from clipboard, which contains \r\n as linebreak (so same as in Environment.NewLine. After I make a change and want to get the text, I get only \r as linebreaks back. Is there any way to change this?
I find the UWPBox can help you.
UWPBox: https://github.com/ruffin--/UWPBox
As the author say:
Let me emphasize that first one. Even if Environment.NewLine is \r\n, and you have \r\n all over myTextBox.Text, if you check myTextBox.SelectedText, at least in Windows 10 for PCs, all newlines will be turned into \r!!! This makes for really wacky integrations of changes to SelectedText back into the context of Text. See the StackOverflow question for a specific example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With