WPF Textblock, linebreak in Text attribute

后端 未结 15 1245
南方客
南方客 2021-02-03 16:37

Is there a way to have \\n make a line break in a TextBlock?


Or is there a

15条回答
  •  面向向阳花
    2021-02-03 17:09

    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 (
).

    Line1
Line2
    

    Looks like

    Line1
    Line2

    For more of the HTML encoded characters check out w3schools

提交回复
热议问题