Compartir a través de


NavigationFailedEventHandler Delegado

Definición

Representa un método que controlará los eventos WebView.NavigationFailed y Frame.NavigationFailed .

public delegate void NavigationFailedEventHandler(Platform::Object ^ sender, NavigationFailedEventArgs ^ e);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1303070321, 4786, 17351, 184, 146, 155, 226, 220, 211, 232, 141)]
class NavigationFailedEventHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(1303070321, 4786, 17351, 184, 146, 155, 226, 220, 211, 232, 141)]
public delegate void NavigationFailedEventHandler(object sender, NavigationFailedEventArgs e);
Public Delegate Sub NavigationFailedEventHandler(sender As Object, e As NavigationFailedEventArgs)

Parámetros

sender
Object

Platform::Object

IInspectable

Objeto donde se adjunta el controlador.

e
NavigationFailedEventArgs

Datos del evento.

Atributos

Requisitos de Windows

Familia de dispositivos
Windows 10 (se introdujo en la versión 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (se introdujo en la versión v1.0)

Ejemplos

En el ejemplo de código siguiente se muestra el uso del evento NavigationFailed .

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

Se aplica a