-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Navigation.NavigationFailedEventHandler |
winrt delegate |
Represents a method that will handle the WebView.NavigationFailed and Frame.NavigationFailed events.
The object where the handler is attached.
Event data for the event.
The following code example demonstrates the use of the NavigationFailed event.
void webViewA_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
var dialog = new Windows.UI.Popups.MessageDialog();
dialog.Title = "Navigation Failed";
dialog.Content = String.Format("Could not navigate to {0}, Reason: {1}",
e.SourcePageType.ToString(), e.Exception.Message);
dialog.ShowAsync();
}