NavigationFailedEventHandler NavigationFailedEventHandler NavigationFailedEventHandler NavigationFailedEventHandler Delegate

Definition

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

public : delegate void NavigationFailedEventHandler(PlatForm::Object sender, NavigationFailedEventArgs e)public delegate void NavigationFailedEventHandler(Object sender, NavigationFailedEventArgs e)Public Delegate NavigationFailedEventHandler(sender As Object, e As NavigationFailedEventArgs)// This API is not available in Javascript.
Parameters
sender
PlatForm::Object Object Object Object

The object where the handler is attached.

Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

The following code example demonstrates the use of the NavigationFailed event.

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