AppNotificationManager.NotificationInvoked Evento

Definizione

Generato quando viene richiamata una notifica dell'app per l'app tramite l'interazione dell'utente.

Note

La classe AppNotificationManager ha una dipendenza dal pacchetto Singleton. A causa di questa dipendenza, è necessario tenere presenti alcune considerazioni se si chiamano queste API da un'app autonoma. Per altre info e specifiche, vedi Dipendenze da pacchetti MSIX aggiuntivi.

// Register
event_token NotificationInvoked(TypedEventHandler<AppNotificationManager, AppNotificationActivatedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
AppNotificationManager::NotificationInvoked_revoker NotificationInvoked(auto_revoke_t, TypedEventHandler<AppNotificationManager, AppNotificationActivatedEventArgs const&> const& handler) const;
public event TypedEventHandler<AppNotificationManager,AppNotificationActivatedEventArgs> NotificationInvoked;
function onNotificationInvoked(eventArgs) { /* Your code */ }
appNotificationManager.addEventListener("notificationinvoked", onNotificationInvoked);
appNotificationManager.removeEventListener("notificationinvoked", onNotificationInvoked);
- or -
appNotificationManager.onnotificationinvoked = onNotificationInvoked;
Public Custom Event NotificationInvoked As TypedEventHandler(Of AppNotificationManager, AppNotificationActivatedEventArgs) 

Tipo evento

Commenti

Per assicurarsi che il gestore eventi NotificationInvoked venga chiamato all'interno del processo dell'app in esecuzione, assicurarsi di registrare il gestore per questo evento prima di chiamare Register. In caso contrario, verrà avviato un nuovo processo per gestire la chiamata.

Si applica a

Vedi anche