Share via


CoreWebView2CreationProperties Class

Definition

This class is a bundle of the most common parameters used to create CoreWebView2Environment and CoreWebView2Controller instances. Its main purpose is to be set to CreationProperties in order to customize the environment and/or controller used by a WebView2 during implicit initialization. It is also a nice WPF integration utility which allows commonly used environment/controller parameters to be dependency properties and be created and used in markup.

public class CoreWebView2CreationProperties : System.Windows.DependencyObject
type CoreWebView2CreationProperties = class
    inherit DependencyObject
Public Class CoreWebView2CreationProperties
Inherits DependencyObject
Inheritance
CoreWebView2CreationProperties

Remarks

This class isn't intended to contain all possible environment or controller customization options. If you need complete control over the environment and/or controller used by a WebView2 control then you'll need to initialize the control explicitly by creating your own environment (with CreateAsync(String, String, CoreWebView2EnvironmentOptions)) and/or controller options (with CreateCoreWebView2ControllerOptions()) and passing them to EnsureCoreWebView2Async(CoreWebView2Environment, CoreWebView2ControllerOptions) *before* you set the Source property to anything. See the WebView2 class documentation for an initialization overview.

Constructors

CoreWebView2CreationProperties()

Creates a new instance of CoreWebView2CreationProperties with default data for all properties.

Fields

AdditionalBrowserArgumentsProperty

The WPF DependencyProperty which backs the AdditionalBrowserArguments property.

AreBrowserExtensionsEnabledProperty

The WPF DependencyProperty which backs the AreBrowserExtensionsEnabled property.

BrowserExecutableFolderProperty

The WPF DependencyProperty which backs the BrowserExecutableFolder property.

IsInPrivateModeEnabledProperty

The WPF DependencyProperty which backs the IsInPrivateModeEnabled property.

LanguageProperty

The WPF DependencyProperty which backs the Language property.

ProfileNameProperty

The WPF DependencyProperty which backs the ProfileName property.

ScriptLocaleProperty

The WPF DependencyProperty which backs the ScriptLocale property.

UserDataFolderProperty

The WPF DependencyProperty which backs the UserDataFolder property.

Properties

AdditionalBrowserArguments

Gets or sets the value to use for the AdditionalBrowserArguments property of the CoreWebView2EnvironmentOptions parameter passed to CreateAsync(String, String, CoreWebView2EnvironmentOptions) when creating an environment with this instance.

AreBrowserExtensionsEnabled

Gets or sets the value to use for the AreBrowserExtensionsEnabled property of the CoreWebView2EnvironmentOptions parameter passed to CreateAsync(String, String, CoreWebView2EnvironmentOptions) when creating an environment with this instance.

BrowserExecutableFolder

Gets or sets the value to pass as the browserExecutableFolder parameter of CreateAsync(String, String, CoreWebView2EnvironmentOptions) when creating an environment with this instance.

IsInPrivateModeEnabled

Gets or sets the value to use for the IsInPrivateModeEnabled property of the CoreWebView2ControllerOptions parameter passed to CreateCoreWebView2ControllerWithOptionsAsync when creating an controller with this instance.

Language

Gets or sets the value to use for the Language property of the CoreWebView2EnvironmentOptions parameter passed to CreateAsync(String, String, CoreWebView2EnvironmentOptions) when creating an environment with this instance.

ProfileName

Gets or sets the value to use for the ProfileName property of the CoreWebView2ControllerOptions parameter passed to CreateCoreWebView2ControllerWithOptionsAsync when creating an controller with this instance.

ScriptLocale

Gets or sets the value to use for the ScriptLocale property of the CoreWebView2ControllerOptions parameter passed to CreateCoreWebView2ControllerWithOptionsAsync when creating an controller with this instance.

UserDataFolder

Gets or sets the value to pass as the userDataFolder parameter of CreateAsync(String, String, CoreWebView2EnvironmentOptions) when creating an environment with this instance.

Applies to