Freigeben über


UserNotificationChangedTrigger Klasse

Definition

Stellt einen Trigger dar, der ausgelöst wird, wenn eine UserNotification hinzugefügt oder entfernt wird.

public ref class UserNotificationChangedTrigger sealed : IBackgroundTrigger
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IUserNotificationChangedTriggerFactory, 196608, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class UserNotificationChangedTrigger final : IBackgroundTrigger
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IUserNotificationChangedTriggerFactory, 196608, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class UserNotificationChangedTrigger final : IBackgroundTrigger
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IUserNotificationChangedTriggerFactory), 196608, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class UserNotificationChangedTrigger : IBackgroundTrigger
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IUserNotificationChangedTriggerFactory), 196608, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class UserNotificationChangedTrigger : IBackgroundTrigger
function UserNotificationChangedTrigger(notificationKinds)
Public NotInheritable Class UserNotificationChangedTrigger
Implements IBackgroundTrigger
Vererbung
Object Platform::Object IInspectable UserNotificationChangedTrigger
Attribute
Implementiert

Windows-Anforderungen

Gerätefamilie
Windows 10 Anniversary Edition (eingeführt in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v3.0)

Hinweise

Der Benutzerbenachrichtigungslistener erfordert, dass explizite Benutzerberechtigungen erteilt werden, bevor er verwendet werden kann. Rufen Sie BackgroundExecutionManager.RequestAccessAsync über den UI-Thread auf, bevor Sie versuchen, auf Benachrichtigungen zuzugreifen.

Konstruktoren

UserNotificationChangedTrigger(NotificationKinds)

Initialisiert eine neue instance der UserNotificationChangedTrigger-Klasse.

Gilt für:

Weitere Informationen