Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.17 KB

navigationfailedeventhandler.md

File metadata and controls

42 lines (29 loc) · 1.17 KB
-api-id -api-type
T:Windows.UI.Xaml.Navigation.NavigationFailedEventHandler
winrt delegate

Windows.UI.Xaml.Navigation.NavigationFailedEventHandler

-description

Represents a method that will handle the WebView.NavigationFailed and Frame.NavigationFailed events.

-parameters

-param sender

The object where the handler is attached.

-param e

Event data for the event.

-remarks

-examples

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();
}

-see-also