CustomSystemEventTrigger CustomSystemEventTrigger CustomSystemEventTrigger CustomSystemEventTrigger CustomSystemEventTrigger Class

Definition

This class allows you to specify a custom system trigger so that you can register it and respond when it is triggered by the system.

public : sealed class CustomSystemEventTrigger : IBackgroundTrigger
struct winrt::Windows::ApplicationModel::Background::CustomSystemEventTrigger : IBackgroundTrigger
public sealed class CustomSystemEventTrigger : IBackgroundTrigger
Public NotInheritable Class CustomSystemEventTrigger Implements IBackgroundTrigger
var customSystemEventTrigger = new customSystemEventTrigger(triggerId, recurrence);
Attributes

Windows 10 requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Remarks

Use this class to define a trigger when the OS doesn't provide a system trigger that you need. Such as when a hardware driver and the UWP app both belong to 3rd party, and the hardware driver needs to raise a custom event that its app handles. For example, an audio card that needs to notify a user when an audio jack is plugged in.

Constructors

CustomSystemEventTrigger(String, CustomSystemEventTriggerRecurrence) CustomSystemEventTrigger(String, CustomSystemEventTriggerRecurrence) CustomSystemEventTrigger(String, CustomSystemEventTriggerRecurrence) CustomSystemEventTrigger(String, CustomSystemEventTriggerRecurrence) CustomSystemEventTrigger(String, CustomSystemEventTriggerRecurrence)

Creates an instance of a CustomSystemEventTrigger, with the specified identifier and recurrence.

Properties

Recurrence Recurrence Recurrence Recurrence Recurrence

Gets when this custom system event trigger may be activated.

TriggerId TriggerId TriggerId TriggerId TriggerId

The trigger identifier that uniquely identifies the background task that needs to be started by this trigger.