Is there a way to have \n make a line break in a TextBlock?
<TextBlock Text="line1\nLine2" />
Or is there a better way to force a middle line break, inside the Text attribute?
<LineBreak />
This doesn’t work for me, it needs to be the value of the Text attribute, because the text string is being set from an outside source.
I’m familiar with LineBreak but it’s not the answer I’m looking for.
I know this is ressurecting an old question, but I had the same problem. The solution for me was to use HTML encoded line feeds (
&#10;).Looks like
For more of the HTML encoded characters check out w3schools