WebView2.EnsureCoreWebView2Async Method

Definition

Overloads

EnsureCoreWebView2Async(CoreWebView2Environment, CoreWebView2ControllerOptions)

Explicitly triggers initialization of the control's CoreWebView2 with the specified environment and controller options.

EnsureCoreWebView2Async()

Explicitly triggers initialization of the control's CoreWebView2.

EnsureCoreWebView2Async(CoreWebView2Environment)

Explicitly triggers initialization of the control's CoreWebView2 with the specified environment.

EnsureCoreWebView2Async(CoreWebView2Environment, CoreWebView2ControllerOptions)

Explicitly triggers initialization of the control's CoreWebView2 with the specified environment and controller options.

public:
 virtual IAsyncAction ^ EnsureCoreWebView2Async(CoreWebView2Environment ^ environment, CoreWebView2ControllerOptions ^ controllerOptions) = EnsureCoreWebView2Async;
/// [Windows.Foundation.Metadata.Overload("EnsureCoreWebView2WithEnvironmentAndOptionsAsync")]
IAsyncAction EnsureCoreWebView2Async(CoreWebView2Environment const& environment, CoreWebView2ControllerOptions const& controllerOptions);
[Windows.Foundation.Metadata.Overload("EnsureCoreWebView2WithEnvironmentAndOptionsAsync")]
public IAsyncAction EnsureCoreWebView2Async(CoreWebView2Environment environment, CoreWebView2ControllerOptions controllerOptions);
function ensureCoreWebView2Async(environment, controllerOptions)
Public Function EnsureCoreWebView2Async (environment As CoreWebView2Environment, controllerOptions As CoreWebView2ControllerOptions) As IAsyncAction

Parameters

environment
CoreWebView2Environment

A pre-created CoreWebView2Environment that should be used to create the CoreWebView2. Creating your own environment gives you control over several options that affect how the CoreWebView2 is initialized. If you pass null then a default environment will be created and used automatically.

controllerOptions
CoreWebView2ControllerOptions

A pre-created CoreWebView2ControllerOptions that should be used to create the CoreWebView2. Creating your own controller options gives you control over several options that affect how the CoreWebView2 is initialized. If you pass a controllerOptions to this method then it will override any settings specified on the CreationProperties property. If you pass null (the default value) and no value has been set to CreationProperties then a default controllerOptions will be created and used automatically.

Returns

An asynchronous action that represents the background initialization process. When it completes the CoreWebView2 property will be available for use (i.e., non-null).

Attributes

Applies to

EnsureCoreWebView2Async()

Explicitly triggers initialization of the control's CoreWebView2.

public:
 virtual IAsyncAction ^ EnsureCoreWebView2Async() = EnsureCoreWebView2Async;
IAsyncAction EnsureCoreWebView2Async();
public IAsyncAction EnsureCoreWebView2Async();
function ensureCoreWebView2Async()
Public Function EnsureCoreWebView2Async () As IAsyncAction

Returns

A Task that represents the background initialization process. When the task completes then the CoreWebView2 property will be available for use (non-null). Note that the CoreWebView2Initialized event will be invoked before the task completes or on exceptions.

Applies to

EnsureCoreWebView2Async(CoreWebView2Environment)

Explicitly triggers initialization of the control's CoreWebView2 with the specified environment.

public:
 virtual IAsyncAction ^ EnsureCoreWebView2Async(CoreWebView2Environment ^ environment) = EnsureCoreWebView2Async;
/// [Windows.Foundation.Metadata.Overload("EnsureCoreWebView2WithEnvironmentAsync")]
IAsyncAction EnsureCoreWebView2Async(CoreWebView2Environment const& environment);
[Windows.Foundation.Metadata.Overload("EnsureCoreWebView2WithEnvironmentAsync")]
public IAsyncAction EnsureCoreWebView2Async(CoreWebView2Environment environment);
function ensureCoreWebView2Async(environment)
Public Function EnsureCoreWebView2Async (environment As CoreWebView2Environment) As IAsyncAction

Parameters

environment
CoreWebView2Environment

A pre-created CoreWebView2Environment that should be used to create the CoreWebView2. Creating your own environment gives you control over several options that affect how the CoreWebView2 is initialized. If you pass null then a default environment will be created and used automatically.

Returns

An asynchronous action that represents the background initialization process. When it completes the CoreWebView2 property will be available for use (i.e., non-null).

Attributes

Applies to