Megosztás a következőn keresztül:


Frame.NavigationFailed Event

Definition

Occurs when an error is raised while navigating to the requested content.

public:
 virtual event NavigationFailedEventHandler ^ NavigationFailed;
// Register
event_token NavigationFailed(NavigationFailedEventHandler const& handler) const;

// Revoke with event_token
void NavigationFailed(event_token const* cookie) const;

// Revoke with event_revoker
Frame::NavigationFailed_revoker NavigationFailed(auto_revoke_t, NavigationFailedEventHandler const& handler) const;
public event NavigationFailedEventHandler NavigationFailed;
function onNavigationFailed(eventArgs) { /* Your code */ }
frame.addEventListener("navigationfailed", onNavigationFailed);
frame.removeEventListener("navigationfailed", onNavigationFailed);
- or -
frame.onnavigationfailed = onNavigationFailed;
Public Custom Event NavigationFailed As NavigationFailedEventHandler 
<Frame NavigationFailed="eventhandler" />

Event Type

Remarks

Currently, you must handle NavigationFailed to respond when the Navigate method fails. You can handle the failure directly in the event handler, or you can set the NavigationFailedEventArgs.Handled property to true and use the Navigate method return value to respond to the failure.

Applies to

See also