In my WPF application that hosts the WebView2 control, I want to keep a track on the loading state of my browser just like how 'OnloadingStateChange' does in CEF.
How can i achieve the same thing in WebView2 ?
In my WPF application that hosts the WebView2 control, I want to keep a track on the loading state of my browser just like how 'OnloadingStateChange' does in CEF.
How can i achieve the same thing in WebView2 ?
The CoreWebView2.NavigationStarting event is dispatched before the top level document of the WebView2 navigates to a new URI and CoreWebView2.NavigationCompleted is dispatched after that navigation fails or the document loads. Here's info on WebView2 navigation events.
From the WPF WebView2 control you can use the CoreWebView2 property to find all navigation events. The CoreWebView2 property is available after the WebView2 is initialized.