.NET binding for the Chromium Embedded Framework (CEF)
CefNet is a .NET CLR binding for the Chromium Embedded Framework (CEF).
Since CefNet is a wrapper, you need to have the Chromium Embedded Framework somewhere on your development system (and redistribute it with your application).
(1) Download the Chromium Embedded Framework from: https://cef-builds.spotifycdn.com/index.html
Note: The major and minor version numbers of CEF and CefNet must match.
(2) Create an instance of the CefNetApplication and initialize it with your settings:
var settings = new CefSettings();
settings.NoSandbox = true;
settings.MultiThreadedMessageLoop = false; // or true
settings.WindowlessRenderingEnabled = true;
settings.LocalesDirPath = "path_to_cef/locales";
settings.ResourcesDirPath = "path_to_cef";
var app = new CefNetApplication();
app.Initialize("path_to_cef", settings);
(3) Add a WebView control to the form of your application.
(4) Run event loop, for example:
CefNetApplication.Run();
Note: You can use the event loop of the UI-framework you are using.
(5) You need to explicitly call CefNetApplication.Shutdown()
from the main
thread before you exit your application:
app.Shutdown();
app.Dispose();
For more information, see the sample applications.
The API of this project is not frozen and is subject to change.
dotnet tool install -g DotAsm
git clone https://github.com/CefNet/CefNet.git