Freigeben über


CoreWebView2EnvironmentOptions Class

Definition

Options used to create WebView2 Environment.

public class CoreWebView2EnvironmentOptions
type CoreWebView2EnvironmentOptions = class
Public Class CoreWebView2EnvironmentOptions
Inheritance
CoreWebView2EnvironmentOptions

Remarks

Default values will use your defaulted Edge WebView2 Runtime binaries and user data folder.

Constructors

CoreWebView2EnvironmentOptions(String, String, String, Boolean, List<CoreWebView2CustomSchemeRegistration>, CoreWebView2ReleaseChannels, CoreWebView2ChannelSearchKind)

Initializes a new instance of the CoreWebView2EnvironmentOptions class.

CoreWebView2EnvironmentOptions(String, String, String, Boolean, List<CoreWebView2CustomSchemeRegistration>)

Initializes a new instance of the CoreWebView2EnvironmentOptions class.

CoreWebView2EnvironmentOptions(String, String, String, Boolean)

Initializes a new instance of the CoreWebView2EnvironmentOptions class.

CoreWebView2EnvironmentOptions(String, String, String)

Properties

AdditionalBrowserArguments

Gets or sets the additional browser arguments to change the behavior of the WebView.

AllowSingleSignOnUsingOSPrimaryAccount

Determines whether to enable single sign on with Azure Active Directory (AAD) resources inside WebView using the logged in Windows account and single sign on (SSO) with web sites using Microsoft account associated with the login in Windows account.

AreBrowserExtensionsEnabled

Enable/disable browser extensions.

ChannelSearchKind

Set ChannelSearchKind to CoreWebView2ChannelSearchKind.LeastStable so that the WebView2 loader searches for binaries from least to most stable: Canary -> Dev -> Beta -> WebView2 Runtime.

CustomSchemeRegistrations

List of custom scheme registrations to be applied to the CoreWebView2Environment

EnableTrackingPrevention

The EnableTrackingPrevention property is used to enable/disable tracking prevention feature in WebView2. This property enable/disable tracking prevention for all the WebView2's created in the same environment. By default this feature is enabled to block potentially harmful trackers and trackers from sites that aren't visited before and set to @CoreWebView2TrackingPreventionLevel$.Balanced or whatever value was last changed/persisted on the profile.

ExclusiveUserDataFolderAccess

Determines whether other processes can create CoreWebView2Controller from CoreWebView2Environment created with the same user data folder and therefore sharing the same WebView browser process instance.

IsCustomCrashReportingEnabled

When IsCustomCrashReportingEnabled is set to true, Windows won't send crash data to Microsoft endpoint.

Language

Gets or sets the default display language for WebView.

ReleaseChannels

Sets the ReleaseChannels, which is a mask of one or more CoreWebView2ReleaseChannels indicating which channels environment creation should search for.

ScrollBarStyle
TargetCompatibleBrowserVersion

Gets or sets the version of the WebView2 Runtime binaries required to be compatible with your app.

Applies to