0

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

Omri Btian
  • 6,499
  • 4
  • 39
  • 65

1 Answers1

1

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.

Sheridan
  • 68,826
  • 24
  • 143
  • 183