-
Notifications
You must be signed in to change notification settings - Fork 19
Chromely CefSharp Usages
- Getting Started
- Configuring
- Loading Html
- Resource Handling
- JavaScript Binding
- Register Ajax/XHR Handlers
- JavaScript Execution
- Scheme Registration
- Scheme Handlers
- Custom Http Handlers
- How to use commands
- Custom CEF Handlers
- How to use app settings
- Using DevTools
When creating a new project, you want to create a .NET Framework/.NET Core 3/.NET 5 WinForms project.
Visual Studio 2019, JetBrains Rider or Visual Studio Code is preferred but any Editor can be used.
A simple Chromely CefSharp project requires:
class Program
{
[STAThread]
static void Main(string[] args)
{
AppBuilder
.Create()
.UseApp<DemoChromelyApp>()
.Build()
.Run(args);
}
}
Chromely CefSharp is configurable and extensible.
To run a Chromely CefSharp app, 3 primary objects can be configured.
Full application builder options:
class Program
{
[STAThread]
static void Main(string[] args)
{
AppBuilder
.Create()
.UseConfig<CustomConfiguraton>()
.UseWindow<CustomWindow>()
.UseApp<CustomChromelyApp>()
.Build()
.Run(args);
}
}
class Program
{
[STAThread]
static void Main(string[] args)
{
AppBuilder
.Create()
.UseConfig<CustomConfiguraton>(new CustomConfiguraton())
.UseWindow<CustomWindow>(new CustomWindow())
.UseApp<CustomChromelyApp>(new CustomChromelyApp())
.Build()
.Run(args);
}
}
To create a Chromely CefSharp application, a custom application class (and/or instance) is required. The class can inherit from any of the abstract class implementations:
To create Chromely CefSharp application, the Configuration class is not required. A custom configuration class must implement - IChromelyConfiguration. If a custom configuration class is not provided, it uses the default - DefaultConfiguration. Alternatively one can be configured using Configuration Section of appsettings.json parsed with Microsoft.Extensions.Configuration.Json.
A custom Window class, inherited from Window can be configured. If a custom configuration class is not provided, it uses the default - Window
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!