Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add new Microsoft Edge to web browser control?

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.

like image 575
Nico Avatar asked Aug 02 '15 15:08

Nico


People also ask

How do I add edge to my browser?

Install Microsoft EdgeOpen the Google Play store. Search for Microsoft Edge. Tap Install for the Edge app.

How do I enable Microsoft Edge in WebView2?

Then, go to Customization > Device Configuration > Modern Apps Settings. Select Microsoft Edge WebView2 and then clear the Enable automatic installation of WebView2 Runtime check box.

How do I change my browser settings in Microsoft Edge?

In Microsoft Edge, click the three-dot icon in the upper right and go to Settings > Default browser. Click the button for Make default. The same trick works for other browsers.


1 Answers

UPDATE Jan 2021: WebView2 has been released. This enables integration of the Chromium based Edge as a web control. It's a lot more complicated to use, unfortunately, but a lot more powerful. Works with WinForms or WPF or C++ apps. https://docs.microsoft.com/en-us/microsoft-edge/webview2/

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.

like image 51
Garr Godfrey Avatar answered Oct 19 '22 19:10

Garr Godfrey