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
UPDATE As stated in @MartinKasztantowicz' answer, as of now (mid Feb '16) there is no known way to load the real Edge rendering engine. The following sets the control to report the new user agent but uses the old engine for rendering. It is useful nevertheless for e.g. persuading sites to turn off deprecated IE hacks.
The browser version of System.Windows.Forms.WebBrowser
is controlled per application by a registry key. If your users are on Windows 10, you can tell the control to load fake Edge by adding the following key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"Example.exe"=dword:00002ee1
respectively [HKEY_CURRENT_USER\...]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"Example.exe"=dword:00002ee1
For more information and values, check the corresponding Microsoft Documentation
I just tested, and got the following result... don't know whether there are any values to also report Windows 10:
Use JavaFX which uses embedded WebKit engine. Or if you're stuck in .NET then https://www.teamdev.com/dotnetbrowser
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.
Has everyone forgotten the Windows API libraries? To embed ANY window you simply need a combination of MoveWindow and SetParent. To hide the title bar you can use SetWindowLong and if you need to hide other parts around the window (e.g. address bar) you can easily use HwndHost.
C++ Example of embedding Notepad:
HWND Window = FindWindow("Notepad", "Untitled - Notepad");
if (Window != nullptr)
{
SetParent(Window, hwnd);
SetWindowPos(Window, nullptr, 0, 0, 0, 0, SWP_NOSIZE);
RedrawWindow(Window, nullptr, nullptr, RDW_INVALIDATE);
ShowWindow(Window, SW_SHOW);
}
Don't get me wrong, it is hacky, but it does work.
Anyway, Microsoft has made such a feature now
For full Edge Chromium support, as of this note, it looks like the WebView2 control is the most recent offering from Microsoft.
https://docs.microsoft.com/en-us/microsoft-edge/webview2/
Unfortunately it seems that there is currently no way to use Edge in a MS webbrowser control without using third party addons. While the proposed "solution" to add dword:00002ee1 to FEATURE_BROWSER_EMULATION causes the webbrowser to (falsely) report Edge/12.9200_AGENT as USER_AGENT, in fact it still uses the Trident engine to render the web content. So it seems that Microsoft had planned to support Edge in webbrowser control but did not get finished and forgot to take out the corresponding Emulation key. You can verify this by browsing to http://html5test.com/ where the webbrowser control scores between 342 and 347 points (the same as IE11), while Edge scores 397 points.