What the best way to get paragraphs in a WPF textblock? (newline chars?)

后端 未结 3 1908
北荒
北荒 2021-01-12 05:22

I have some text which has \"\\r\\n\" newline markers. I would like to have the newlines in a WPF textblock. I\'ve tried replacing \"\\r\\n\" with \"& # 13;\" (without t

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 05:45

    textBlock.Text = string.Format("One{0}Two", Environment.NewLine);
    

提交回复
热议问题