My objective is to show the HTML content with style in my WPF application. I am getting a HTML content as response from a API. I need to show the content in a frame ( preferably textblock). I tried with webbrowser control of wpf where I faced many issues on formatting over the grid and I am not able to show transparent background for webbrowser control. I found the issue is due to this.
Sample HTML content :
<p>My <b>para<b></p><ul> <li>My list1</li> <li>My list2</li></ul>
I researched over the internet and found some control for wpf.
Awesomium
WPF Chromium
I am newbie to WPF C# and I don't have idea about how to use the controls in my wpf application. I tried with some sample application from here and here. However, It showing lot of error due to reference missing.
Also I tried with HtmltoXaml converter and WPF Rich box and found that it skips many of the content after rendering.
It would be really helpful for me if I get a simple sample wpf application working without error implemented with above mentioned controls or links that are useful.
Any new idea to overcome my issue also appreciated. Thanks in advance and sorry for my English.
If you need a html5 rendering browser, I'd recommend CEFSharp. It's nugettable, stable and is synced with the latest Chromium code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With