Share via


WebView2.EnsureCoreWebView2Async Method

Definition

Explicitly trigger initialization of the control's CoreWebView2.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

public:
 virtual IAsyncAction ^ EnsureCoreWebView2Async() = EnsureCoreWebView2Async;
IAsyncAction EnsureCoreWebView2Async();
public IAsyncAction 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