Last week I spent 3 pomodoros of deliberate practice trying to get started with the Chrome Embedded Framework (CEF). I am interested in learning something about it because it’s used in the product I am currently working on (SQL Source Control).
CEF allows you to use web technologies in a desktop application and it does that embedding the Chrome engine into your application. From a quick look in Wikipedia, look like there are many .NET bindings. I don’t know which one is best but I selected Xilium.CefGlue because it the one used in my project. I know other projects in Redgate that use others bindings like CefSharp.
Unfortunately there is very little documentation for getting started with Xilium.CefGlue. Very disappointing. I found the following blog post to be very useful: http://joelverhagen.com/blog/2013/12/headless-chromium-in-c-with-cefglue/
In order to run the demo project, you need to copy the CEF binaries in the same folder.
When I lunched the demo project I got the following error.
As mentioned in the blog post, it’s very important to make sure that the CEF version used by CefGlue match the version in the CEF binaries that you copied. If not, you get an error. This was the most annoying thing and as soon as I found a matching version the demo projected worked.
You can see my blog loaded inside a Windows Forms application.