Reputation: 1
My WebRequest
returns an html code for the page I want to show.
How can I show it using a html code returned from my WPF? how can I "create" a page using just returned html code ? And how can I focus a browser when it is open?
Plz, some example will be fine. thanks
Upvotes: 0
Views: 236
Reputation: 69959
You can display an HTML
web page from a string
variable in a WebBrowser
control in a WPF application using the NavigateToString
method:
The XAML:
<WebBrowser Name="webBrowser" />
The code:
webBrowser.NavigateToString(htmlPageAsAString);
webBrowser.Focus();
Please take a look at the WebBrowser.NavigateToString Method page for more information.
Upvotes: 1