Compartir a través de


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.

public class CoreWebView2CreationProperties
type CoreWebView2CreationProperties = class
Public Class CoreWebView2CreationProperties
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.

Properties

AdditionalBrowserArguments

Gets or sets the value to pass as the AdditionalBrowserArguments parameter of CoreWebView2EnvironmentOptions which is 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.

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