Replacing .Net Webbrowser Control With a Better Browser, Like Chrome

Replacing Latest .NET WebBrowser Control with a browser, like Firefox or Chrome

Take a look at CefSharp: https://github.com/cefsharp/CefSharp

CefSharp lets you embed Chromium in .NET apps. It is a lightweight .NET wrapper around the Chromium Embedded Framework (CEF) by Marshall A. Greenblatt. About 30% of the bindings are written in C++/CLI with the majority of code here is C#. It can be used from C# or VB, or any other CLR language. CefSharp provides both WPF and WinForms web browser control implementations.


Options for embedding Chromium instead of IE WebBrowser control with WPF/C#

You've already listed the most notable solutions for embedding Chromium (CEF, Chrome Frame, Awesomium). There aren't any more projects that matter.

There is still the Berkelium project (see Berkelium Sharp and Berkelium Managed), but it emebeds an old version of Chromium.

CEF is your best bet - it's fully open source and frequently updated. It's the only option that allows you to embed the latest version of Chromium. Now that Per Lundberg is actively working on porting CEF 3 to CefSharp, this is the best option for the future. There is also Xilium.CefGlue, but this one provides a low level API for CEF, it binds to the C API of CEF. CefSharp on the other hand binds to the C++ API of CEF.

Adobe is not the only major player using CEF, see other notable applications using CEF on the CEF wikipedia page.

Updating Chrome Frame is pointless since the project has been retired.

Better Webbrowser Control with More Control Over Urls and Information?

Mind to Replacing with some like geckofx ( mozilla firefox ENGINE)?

Start at this:

GeckoFX

Event now you can using xulrunner 16 ( main engine of mozilla firefox 16 ).

New GeckoFX
and
XulRunner

Here article about useragent in xulrunner

web browser control in winform with google chrome c#

VS default browser control use IE. You should use cefsharp for chrome browser.
First include the library and initialize like this...

public ChromiumWebBrowser browser;
private void InitBrowser()
{
try
{
if (!Cef.IsInitialized)
{
CefSettings settings = new CefSettings();
settings.BrowserSubprocessPath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "CefSharp.BrowserSubprocess.exe");

Cef.Initialize(settings);
}
string url = "www.google.com";

browser = new ChromiumWebBrowser(url);
this.Controls.Add(browser);
browser.Dock = DockStyle.Fill;

browser.IsBrowserInitializedChanged += browser_IsBrowserInitializedChanged;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}

private void browser_IsBrowserInitializedChanged(object sender, IsBrowserInitializedChangedEventArgs e)
{
if (((ChromiumWebBrowser)sender).IsBrowserInitialized)
{
//if needed then use dev tool
browser.ShowDevTools();
}
}

For more info please see below link...
https://github.com/cefsharp/CefSharp
https://github.com/cefsharp/CefSharp/wiki/Quick-Start



Related Topics



Leave a reply



Submit