3

We did some experiments loading sample HTML pages in to the latest version of WPF Web browser control which comes with VS 2017 IDE. Seems perfect in most of the cases except when loading following URLs which throws error messages, which is not the case in modern web browsers like IE, Chrome.

E.g. 1. Error message for W3Schools: enter image description here

  1. Error message for HTML5Rocks : enter image description here

Please let us know whether WPF browser control is perfect enough to render/support modern web technology features in our desktop application projects?

-Thank you

Zameer
  • 95
  • 1
  • 1
  • 8
  • 2
    "Perfect enough" does not make sense. "Good enough" or "Perfect" would make sense IMHO but... It is opinion based anyway – Cleptus Jul 16 '18 at 11:05
  • 2
    The WebBrowser wraps IE which is behind a configurable emulation layer with terrible defaults, see: [Use latest version of Internet Explorer in the webbrowser control](https://stackoverflow.com/questions/17922308/use-latest-version-of-internet-explorer-in-the-webbrowser-control) - Alternatively something like CefSharp would allow you to use a contemporary Chrome engine. – Alex K. Jul 16 '18 at 11:06

2 Answers2

6

I believe the "modern" browser experience on Windows in Microsoft Edge. You could use the WebView control to use it in your WPF application as explained in this blog post. This assumes you are targeting the April 2018 release of Windows 10 or later.

If your users are still in Windows 7, you may want to look for a third-party browser control such as for example CefSharp.

mm8
  • 163,881
  • 10
  • 57
  • 88
  • The blog post is outdated. https://www.nuget.org/packages/Microsoft.Toolkit.Win32.UI.Controls is now obsolete, you should use https://www.nuget.org/packages/Microsoft.Toolkit.Wpf.UI.Controls.WebView – Orace May 20 '20 at 10:22
0

The Microsoft.Toolkit.Win32 Control is replaced with a new Webview2 control https://learn.microsoft.com/en-us/microsoft-edge/webview2/get-started/wpf

Here is a good Introduction Video

Summer-Time
  • 1,824
  • 15
  • 19