Answer the question
In order to leave comments, you need to log in
How to render html code from string in WPF application?
Good afternoon friends.
The task is as follows, the client receives an HTML code, which is processed and packed into a string. Further, this code needs to be fully rendered and displayed, but the problem is that this code should not be read from a file, but from a string.
How to do it?
Thank you.
Answer the question
In order to leave comments, you need to log in
Did I understand you correctly: the program requests a certain page (request), the results are returned as an HTML string. Your task is to display elements nicely in a WPF application.
Options:
var browser = new System.Windows.Controls.WebBrowser();
browser.NavigateToString(string strHtml);
var doc = new HtmlDocument();
doc.LoadHtml(html);
If I correctly understood the essence of the question, then: HtmlRenderer.WPF
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question