Compartilhar via


UserNotificationChangedTrigger Classe

Definição

Representa um gatilho que é acionado quando uma UserNotification é adicionada ou removida.

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
Herança
Object Platform::Object IInspectable UserNotificationChangedTrigger
Atributos
Implementações

Requisitos do Windows

Família de dispositivos
Windows 10 Anniversary Edition (introduzida na 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduzida na v3.0)

Comentários

O ouvinte de notificação do usuário requer que a permissão explícita do usuário seja concedida antes que ela possa ser usada. Chame BackgroundExecutionManager.RequestAccessAsync do thread da interface do usuário antes de tentar acessar as notificações.

Construtores

UserNotificationChangedTrigger(NotificationKinds)

Inicializa uma nova instância da classe UserNotificationChangedTrigger .

Aplica-se a

Confira também