Search code examples
c#.netcontrolsactivex

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


I am using Visual Studio C# found an ActiveX control but it looks like it's an old version.

I need:

  • A browser that can integrate inside a window of my application (not a separate window)

  • A good support for CSS, js and other web technologies, on par with any modern browser

  • Basic browser functions like "navigate", "back", "reload"... Liberal access to the page code and output.


Solution

  • 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.