次の方法で共有


CoreWebView2Frame.NavigationStarting Event

Definition

NavigationStarting is raised when the current frame is requesting permission to navigate to a different URI.

public event EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2NavigationStartingEventArgs> NavigationStarting;
member this.NavigationStarting : EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2NavigationStartingEventArgs> 
Public Custom Event NavigationStarting As EventHandler(Of CoreWebView2NavigationStartingEventArgs) 

Event Type

Remarks

A frame navigation will raise a NavigationStarting event and a FrameNavigationStarting event. All of the FrameNavigationStarting event handlers will be run before the NavigationStarting event handlers. All of the event handlers share a common CoreWebView2NavigationStartingEventArgs object. Whichever event handler is last to change the Cancel property will decide if the frame navigation will be cancelled. Redirects raise this event as well, and the navigation id is the same as the original one. You may block corresponding navigations until the event handler returns.

Applies to