Use chrome as a browser in c #?

Is there a way to use Google Chrome (or Safari or Firefox) as a browser in a C # application? C # now uses Internet Explorer, and the website they want to use in this program does not support it.

+47
c # google-chrome embedded-browser
Jan 26 '10 at 18:33
source share
11 answers

You can use WebKit.NET . This is the C # wrapper for WebKit, which is the rendering engine used by Chrome.

+52
Jan 26 '10 at 18:35
source share

You can use GeckoFX to embed firefox

+43
Jan 26 '10 at 18:35
source share

I don’t know of any complete Chrome component, but you can use WebKit, which is the rendering engine that Chrome uses. The Mono project made WebKit Sharp , which might work for you.

+12
Jan 26 '10 at 18:37
source share

I use Awesomium, I think it is better than GeckoFX / WebKit http://awesomium.com

+10
May 12 '13 at 18:58
source share

OpenWebKitSharp gives you full control over WebKit Nightly, which is very close to webkit in terms of performance and compatibility. Chrome uses the WebKit Chromium engine, while WebKit.NET uses Cairo and OpenWebKitSharp Nightly. Chrome should be the best of these collections, and Nightly should appear in 2nd place, and that's why I suggest OpenWebKitSharp.

http://gt-web-software.webs.com/libraries.htm in the OpenWebKitSharp section

+5
06 Oct '11 at 18:05
source share
+4
Jun 06 2018-12-12T00:
source share

1/3/2017 β†’ January 3, 2017

Hi, I found this article today to achieve this, an article called "Creating HTML UI for .NET Desktop Applications" and is designed to embed chrome-based controls in a WPF application. It saved me in the afternoon.

https://www.infoq.com/articles/html-desktop-net

I hope this helps someone else.

NOTE: it is based on DotNetBrowser, see the license agreement here: https://www.teamdev.com/dotnetbrowser-licence-agreement

+3
Jan 03 '17 at 9:35 on
source share
+2
Jan 26 '10 at 18:37
source share

2014 update:

I use geckofx , a healthy open source project that (at the time of this writing) is very well updated with the latest Firefox releases.

To implement Chrome, you can consider another healthy, promising open source project, Xilium.cefGlue, based on the Integrated Chrome Infrastructure (CEF) .

Both of them support WPF and Winforms, and both projects support .net and mono.

+2
Mar 10 '14 at 23:46
source share

Take a look at the DotNetBrowser library. It provides WPF and Chromium-based WinForms browser controls that are pretty easy to integrate into a .NET application. It supports all modern web standards, including HTML5, CSS3 and JavaScript. The page displays the same as in Google Chrome.

The library inherits the multiprocess architecture of Chromium - each web page is displayed in a separate Chromium process, and the application continues to work even after a plug-in crashes or any other unexpected error on the web page.

Here are some other useful features provided by DotNetBrowser: it is possible to listen to download events, handle network activity, configure proxies, simulate user actions, work with cookies, access and modify DOM, listen to DOM events, call JavaScript from .NET and vice versa, use webcam and microphone on the webpage, set up WebRTC-based communication and much more .

Check out the API Link for more details.

The code snippet below demonstrates how to create a BrowserView, embed it in a form, and upload a URL:

using System.Windows.Forms; using DotNetBrowser; using DotNetBrowser.WinForms; namespace WinForms.DotNetBrowser { public partial class Form1 : Form { public Form1() { InitializeComponent(); BrowserView browserView = new WinFormsBrowserView(); Controls.Add((Control) browserView); browserView.Browser.LoadURL("http://www.youtube.com"); } } } 

By running the above example, you will get the following output:

enter image description here

The library is commercial. Commercial licenses include support packages for different team sizes. You can also purchase the source code of the library.

In addition to its own page, the component is available as a NuGet package and a VSIX package in the Visual Studio Marketplace.

+2
Apr 22 '15 at 15:53
source share

Update 2016:

Unfortunately, most of the above solutions are outdated and are no longer supported.

There are 3 additional parameters that I can offer that are still being actively developed:

1. BrowseEmAll.Cef

A .Net component that you can use to integrate the Chrome engine into your .NET Application. Based on CefGlue , but slightly faster when updating the latest version of Chrome. There is also commercial support available that may be useful to some. Of course, the component itself is open source .

2. BrowseEmAll.Gecko

Another .Net component that you can use to integrate the Firefox engine into yours. Net application. This is based on Geckofx , but unlike the current version of Geckofx, it will work with the regular version of Firefox. To use Geckofx, you will need to create Firefox yourself. Again, commercial support is available, but the component itself is fully open source .

3. BrowseEmAll Core API

Are all browsers needed in your .Net application? Which BrowseEmAll Core API you can integrate Chrome, Firefox, Webkit and Internet Explorer into your application. This is a commercial product , although it should be warned.

(Full disclosure: I work for this company, so take everything I say with salt)

+2
Feb 13 '16 at 10:36
source share



All Articles