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.
Try this:
<TextBlock>
line1
<LineBreak />
line2
</TextBlock>