NavigationView.BackRequested イベント

定義

[戻る] ボタンがクリックやタップなどの操作を受け取ったときに発生します。

UWP 用の同等の WinUI 2 API: Microsoft.UI.Xaml.Controls.NavigationView.BackRequested (Windows アプリ SDKの WinUI の場合は、Windows アプリ SDK名前空間を参照してください)。

// Register
event_token BackRequested(TypedEventHandler<NavigationView, NavigationViewBackRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
NavigationView::BackRequested_revoker BackRequested(auto_revoke_t, TypedEventHandler<NavigationView, NavigationViewBackRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<NavigationView,NavigationViewBackRequestedEventArgs> BackRequested;
function onBackRequested(eventArgs) { /* Your code */ }
navigationView.addEventListener("backrequested", onBackRequested);
navigationView.removeEventListener("backrequested", onBackRequested);
- or -
navigationView.onbackrequested = onBackRequested;
Public Custom Event BackRequested As TypedEventHandler(Of NavigationView, NavigationViewBackRequestedEventArgs) 
<NavigationView BackRequested="eventhandler" />

イベントの種類

Windows の要件

デバイス ファミリ
Windows 10, version 1803 (10.0.17134.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v6.0 で導入)

適用対象

こちらもご覧ください