line break in string in c#
c#-4.0, windows-8, windows-runtime, winrt-xaml
Solution
It looks like the Resource file is escaping `\n` to `\\n`, this means that there are basically 2 solutions to solve this.
you can either
var str = Regex.Unescape(loader.GetString("AboutText"));
or in your resx file you can replace \n with normal break line by pressing Shift Enter.
Problem
I'm loading a text from the resource loader which includes '\n' to indicate a new line. A textblock takes this text and displays it, but I can't see the line break? I'm also trying to replace every '\n' by Environment.NewLine, but nothing happens. What can I do? Here is a little bit code: ``` TextBlock text = new TextBlock(); text.FontSize = 18; var str = loader.GetString("AboutText"); //str.Replace("\n", Environment.NewLine); text.Text = str; text.TextAlignment = TextAlignment.Justify; text.TextWrapping = TextWrapping.Wrap; text.Margin = new Thickness(10, 10, 10, 10); ```