-
Notifications
You must be signed in to change notification settings - Fork 30
WebView2 Configuration
mattkol edited this page Jul 13, 2021
·
1 revision
WebView2CreationOptions is class that has collection of commonly configurable WebView2 properties. Most EdgeSharp development may not need to make any changes, but advanced users may have need to make changes here and there. Part or entire WebView2CreationOptions can also be overriden in:
The default values will be used.
using EdgeSharp;
using EdgeSharp.Core.Configuration;
using EdgeSharp.Core.Defaults;
using System;
namespace MyEdgeSharpApp
{
class Program
{
[STAThread]
static void Main(string[] args)
{
// create a configuration with preset defaults
var config = new Configuration();
// your configuration
config.StartUrl = "https://developer.microsoft.com/en-us/microsoft-edge/webview2/";
config.WindowOptions.Title = "My Awesome EdgeSharp App!";
config.WebView2CreationOptions.AdditionalBrowserArguments = "disable-web-security";
config.WebView2CreationOptions.IsStatusBarEnabled = false;
//..
AppBuilder
.Create()
.UseConfig<IConfiguration>(config)
.UseApp<SampleEdgeSharpApp>()
.Build()
.Run(args);
}
}
}
EdgeSharp
Getting Started
Resource handling - How files are loaded
Inter-process Communication (IPC)
- Introduction
- AddHostObjectToScript
- PostWebMessage
- Ajax XHR
- Action Controllers
- Creating & Registering Host Objects
- Creating & Registering PostWebMessage Script Promise
- Registering Custom Request Scheme Handlers
Customizing and Extending EdgeSharp
EdgeSharp Samples
Debugging