Displaying HTML in WPF using MVVM

后端 未结 3 1545
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-12 02:43

I have HTML-Source string saved in SQL Server table called \"Report\" in HTMLReport field (field type is NTEXT). Now I need to display that stored HTML into WPF Window. HT

3条回答
  •  失恋的感觉
    2021-01-12 03:34

    You'll probably want to use a WPF RichTextBox instead of the Winforms one. Note that its Document property is of type FlowDocument. Since you have HTML, you will need a way to convert HTML to a FlowDocument. This question and answer describe a way to do the conversion.

提交回复
热议问题