WebView2.CoreWebView2InitializationCompleted Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This event is triggered either
- when the control's CoreWebView2 has finished being initialized (regardless of how initialization was triggered) but before it is used for anything, or
- if the initialization failed. You should handle this event if you need to perform one time setup operations on the CoreWebView2 which you want to affect all of its usages. (e.g. adding event handlers, configuring settings, installing document creation scripts, adding host objects). See the WebView2 class documentation for an initialization overview.
public event EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs> CoreWebView2InitializationCompleted;
member this.CoreWebView2InitializationCompleted : EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs>
Public Event CoreWebView2InitializationCompleted As EventHandler(Of CoreWebView2InitializationCompletedEventArgs)
Public Custom Event CoreWebView2InitializationCompleted As EventHandler(Of CoreWebView2InitializationCompletedEventArgs)
Event Type
Implements
Remarks
This sender will be the WebView2 control, whose CoreWebView2 property will now be valid (i.e. non-null) for the first time if IsSuccess is true
. Unlikely this event can fire second time (after reporting initialization success first) if the initialization is followed by navigation which fails.