AppNotificationManager.NotificationInvoked Ereignis

Definition

Wird ausgelöst, wenn eine App-Benachrichtigung für die App durch Benutzerinteraktionen aufgerufen wird.

Hinweis

Die AppNotificationManager-Klasse ist vom Singleton-Paket abhängig. Aufgrund dieser Abhängigkeit sind bestimmte Überlegungen zu beachten, wenn Sie diese APIs aus einer eigenständigen App aufrufen. Weitere Informationen und Einzelheiten finden Sie unter Abhängigkeiten von zusätzlichen MSIX-Paketen.

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

Ereignistyp

Hinweise

Um sicherzustellen, dass der NotificationInvoked-Ereignishandler innerhalb des Prozesses der ausgeführten App aufgerufen wird, müssen Sie den Handler für dieses Ereignis registrieren, bevor Sie Register aufrufen. Andernfalls wird ein neuer Prozess gestartet, um den Aufruf zu verarbeiten.

Gilt für:

Weitere Informationen