ApplicationTrigger Class

Definition

This allows you to programmatically trigger a background task from within your application.

public ref class ApplicationTrigger sealed
class ApplicationTrigger sealed
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ApplicationTrigger
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ApplicationTrigger
function ApplicationTrigger()
Public NotInheritable Class ApplicationTrigger
Inheritance
ApplicationTrigger
Attributes
Implements
<xref href="Windows.ApplicationModel.Background.IBackgroundTrigger?alt=Windows.ApplicationModel.Background.IBackgroundTrigger&text=IBackgroundTrigger" data-throw-if-not-resolved="True"/>

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Important

An app can only register one ApplicationTrigger with the BackgroundTaskBuilder at any given time.

Constructors

ApplicationTrigger()

Creates a new ApplicationTrigger class

Methods

RequestAsync()

This method attempts to set the trigger and start the registered background task.

RequestAsync(ValueSet)

This method attempts to set the trigger and start the registered background task with specified arguments.

Applies to