NavigationView.BackRequested Kejadian

Definisi

Terjadi saat tombol kembali menerima interaksi seperti klik atau ketuk.

API WinUI 2 yang setara untuk UWP: Microsoft.UI.Xaml.Controls.NavigationView.BackRequested (untuk WinUI di SDK Aplikasi Windows, lihat namespace SDK Aplikasi Windows).

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

Jenis Acara

Persyaratan Windows

Rangkaian perangkat
Windows 10, version 1803 (diperkenalkan dalam 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v6.0)

Berlaku untuk

Lihat juga