Share via


AppNotificationManager.NotificationInvoked 事件

定義

透過使用者互動叫用代理程式更新時引發。

注意

AppNotificationManager類別相依于Singleton 套件。 由於該相依性,如果您要從 獨立應用程式呼叫這些 API,請務必注意。 如需詳細資訊和細節,請參閱 其他 MSIX 套件的相依性

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

事件類型

備註

為了確保在執行中應用程式的進程內呼叫 NotificationInvoked 事件處理常式,請務必先註冊此事件的處理常式,再呼叫 Register。 否則,將會啟動新的進程來處理調用。

適用於

另請參閱