Compartir a través de


UserNotificationChangedTrigger Clase

Definición

Representa un desencadenador que se activa cuando se agrega o quita un UserNotification .

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
Herencia
Object Platform::Object IInspectable UserNotificationChangedTrigger
Atributos
Implementaciones

Requisitos de Windows

Familia de dispositivos
Windows 10 Anniversary Edition (se introdujo en la versión 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (se introdujo en la versión v3.0)

Comentarios

El agente de escucha de notificaciones de usuario requiere que se conceda permiso de usuario explícito antes de que se pueda usar. Llame a BackgroundExecutionManager.RequestAccessAsync desde el subproceso de interfaz de usuario antes de intentar acceder a las notificaciones.

Constructores

UserNotificationChangedTrigger(NotificationKinds)

Inicializa una nueva instancia de la clase UserNotificationChangedTrigger .

Se aplica a

Consulte también