Freigeben über


IWebView2.CoreWebView2InitializationCompleted Event

Definition

This event is triggered either

  1. when the control's CoreWebView2 has finished being initialized (regardless of how initialization was triggered) but before it is used for anything, or
  2. 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.
event EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs> CoreWebView2InitializationCompleted;
member this.CoreWebView2InitializationCompleted : EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs> 
Event CoreWebView2InitializationCompleted As EventHandler(Of CoreWebView2InitializationCompletedEventArgs) 

Event Type

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.

Applies to

See also