I'm new to C# and the WebView2 control, and I'm trying to make something happen when a webpage inside the control finishes loading.
webView.NavigationCompleted += new CoreWebView2NavigationCompletedEventArgs(WebView_NavigationCompleted);
The code above throws a CS1729 error. What is the correct way to implement what I'm trying to accomplish? Any help appreciated!
Check out the WebView2 C# sample apps. It has a C# example of just what you're trying to do.
control.NavigationCompleted += WebView_NavigationCompleted;
void WebView_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e)
{
// ...
}
See also Navigation Events documentation.