Add new Microsoft Edge to web browser control?

Nico picture Nico · Aug 2, 2015 · Viewed 58k times · Source

The new Windows 10 with Microsoft Edge has arrived. I want to ask you, how can I add it to my web browser control? I need it because the actual web browser control doesn't allow JavaScript and CSS3.

I used to also add Chrome browser with the projects WebKit and Awesomium but they didn't remember the login credentials (I need them for my app) so I have to use I.E. unfortunately.

Answer

Garr Godfrey picture Garr Godfrey · Jul 26, 2017

UPDATE May 2018: FINALLY Microsoft has made it easy. https://blogs.windows.com/msedgedev/2018/05/09/modern-webview-winforms-wpf-apps/

For now, the new control is in the Windows Community Toolkit 3.0 and contained in Toolkit.Win32.UI.Controls.dll, which you may need to manually add a reference to.

====== I wish somebody had mentioned this, so I'll add this because it doesn't look like webbrowser control will ever be updated.

Use the WebView control instead. This uses EdgeHTML rendering engine. This is part of WindowPresentation layer but it is possible to link from WinForms and presumably other apps. You must convert to a UWP app

import Windows.UI.Xaml.Controls.WebView

Example code: https://code.msdn.microsoft.com/windowsapps/XAML-WebView-control-sample-58ad63f7

I haven't replaced my WebBrowser with WebView yet, but the interface looks pretty familiar.