Compartir a través de


NavigationView.BackRequested Evento

Definición

Se produce cuando el botón Atrás recibe una interacción como un clic o pulsación.

API de WinUI 2 equivalente para UWP: Microsoft.UI.Xaml.Controls.NavigationView.BackRequested (para WinUI en el SDK de Aplicaciones para Windows, consulta los espacios de nombres SDK de Aplicaciones para 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" />

Tipo de evento

Requisitos de Windows

Requisitos Description
Familia de dispositivos
Windows 10, version 1803 (se introdujo en la versión 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (se introdujo en la versión v6.0)

Se aplica a

Consulte también