AppWindow.CloseRequested Evento

Definizione

Si verifica dopo l'avvio della chiusura della finestra, ma prima che venga chiuso e prima che si verifichi l'evento Closed.

// Register
event_token CloseRequested(TypedEventHandler<AppWindow, AppWindowCloseRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
AppWindow::CloseRequested_revoker CloseRequested(auto_revoke_t, TypedEventHandler<AppWindow, AppWindowCloseRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<AppWindow,AppWindowCloseRequestedEventArgs> CloseRequested;
function onCloseRequested(eventArgs) { /* Your code */ }
appWindow.addEventListener("closerequested", onCloseRequested);
appWindow.removeEventListener("closerequested", onCloseRequested);
- or -
appWindow.oncloserequested = onCloseRequested;
Public Custom Event CloseRequested As TypedEventHandler(Of AppWindow, AppWindowCloseRequestedEventArgs) 

Tipo evento

Commenti

Importante

Questo evento si verifica solo quando l'app ha la funzionalità con restrizioni Di conferma chiusura dell'app (<rescap:Capability Name="confirmAppClose"/>), quindi non è applicabile alla maggior parte delle app. Per altre info, vedi Dichiarazioni di funzionalità delle app - Funzionalità con restrizioni.

Si applica a

Vedi anche