Frame.NavigationFailed 事件

定义

在导航到所需内容的同时遇到错误时发生。

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" />

事件类型

注解

Navigate 方法失败时,必须处理 NavigationFailed 以响应。 可以直接在事件处理程序中处理失败,也可以将 NavigationFailedEventArgs.Handled 属性设置为 true ,并使用 Navigate 方法返回值来响应失败。

适用于

另请参阅