WPF Display formatted multiline text using data binding

后端 未结 2 1391
北海茫月
北海茫月 2021-01-15 23:19

I need to display the following using WPF databinding (the values change). Headers must be bold, the info lines are normal text. If info for a given header does not exist, I

2条回答
  •  猫巷女王i
    2021-01-15 23:44

    If you want to do the bolding in a style I think your best bet would be to break your string up and use TextBlocks within a StackPanel within an Expander.

    Alternatively you could do it in a RichTextBox with your whole string, but I think your string would have to contain the tags.

提交回复
热议问题