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

Matheus Mello
Matheus Mello
September 2, 2023
Cover Image for Options for embedding Chromium instead of IE WebBrowser control with WPF/C#

Embedding Chromium Instead of IE WebBrowser Control with WPF/C#

šŸ“ Updated for 2020! šŸŽ‰ Check out my article where I compare the memory footprints of different approaches to hosting HTML WebView in a basic Windows Desktop application: Comparing Process Working Sets of WebView-Based Windows Desktop Apps

If you're developing a WPF/C# project that involves HTML editing and are looking for options to embed Chromium instead of the Internet Explorer (IE) WebBrowser control, you're in the right place. The WebBrowser control has its fair share of issues, such as keyboard and focus problems and memory leaks. Luckily, there are alternative solutions available that can address these problems and provide a better experience for your users.

Here are some options you can consider:

Awesomium and Awesomium.NET

Awesomium is an option that may seem appropriate for your project. However, it's worth noting that the project is not open-source and the full source code is not easily available. Additionally, if off-screen rendering isn't a critical requirement for your project, Awesomium might be overkill.

Chromium Embedded Framework (CEF) and .NET bindings for CEF

The Chromium Embedded Framework (CEF) along with its .NET bindings is arguably the best option currently available. This project is actively maintained and is in sync with Chrome version 27. CEF3 uses Chrome's multi-process architecture, and it has received endorsement from Adobe. This option provides a robust and reliable way to embed Chromium in your WPF/C# project.

Google's Chrome Frame

Although Google has discontinued Chrome Frame, it can still be a viable option for embedding Chromium. Originally designed as an HTML5 plugin for IE and Firefox, Chrome Frame can be used as a standalone ActiveX control that can be wrapped for use with WPF. It offers a sufficient API for interacting with the inner web page. While updating it with the latest Chromium code might require some effort, it provides you with full control over the integration.

WebKit .NET Wrapper

Although not Chromium-based and lacking the V8 engine, the WebKit .NET Wrapper is not a suitable option for embedding Chromium. However, if Chromium compatibility is not a priority, it can still serve your needs.

If you think I may have missed any other options, please let me know! I would greatly appreciate it if someone could share their experience with any of the mentioned options in a real-life, production-quality WPF project. Any insights into integration, licensing, or deployment implications would be invaluable.

Don't hesitate to leave a comment below and share your thoughts or experiences. Let's discuss the best ways to embed Chromium in your WPF/C# project and make HTML editing a breeze! šŸ’ŖšŸŒšŸ’»

Take Your Tech Career to the Next Level

Our application tracking tool helps you manage your job search effectively. Stay organized, track your progress, and land your dream tech job faster.

Your Product
Product promotion

Share this article

More Articles You Might Like

Latest Articles

Cover Image for How can I echo a newline in a batch file?
batch-filenewlinewindows

How can I echo a newline in a batch file?

Published on March 20, 2060

šŸ”„ šŸ’» šŸ†’ Title: "Getting a Fresh Start: How to Echo a Newline in a Batch File" Introduction: Hey there, tech enthusiasts! Have you ever found yourself in a sticky situation with your batch file output? We've got your back! In this exciting blog post, we

Cover Image for How do I run Redis on Windows?
rediswindows

How do I run Redis on Windows?

Published on March 19, 2060

# Running Redis on Windows: Easy Solutions for Redis Enthusiasts! šŸš€ Redis is a powerful and popular in-memory data structure store that offers blazing-fast performance and versatility. However, if you're a Windows user, you might have stumbled upon the c

Cover Image for Best way to strip punctuation from a string
punctuationpythonstring

Best way to strip punctuation from a string

Published on November 1, 2057

# The Art of Stripping Punctuation: Simplifying Your Strings šŸ’„āœ‚ļø Are you tired of dealing with pesky punctuation marks that cause chaos in your strings? Have no fear, for we have a solution that will strip those buggers away and leave your texts clean an

Cover Image for Purge or recreate a Ruby on Rails database
rakeruby-on-railsruby-on-rails-3

Purge or recreate a Ruby on Rails database

Published on November 27, 2032

# Purge or Recreate a Ruby on Rails Database: A Simple Guide šŸš€ So, you have a Ruby on Rails database that's full of data, and you're now considering deleting everything and starting from scratch. Should you purge the database or recreate it? šŸ¤” Well, my