共用方式為


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 方法傳回值來回應失敗。

適用於

另請參閱