Windows.ApplicationModel.Startup
Provides types that enable your UWP app to define its startup behavior, including handling activation and background tasks.
StartupTask
Represents a background task that can be started by the system. This class is used to define and manage the lifecycle of these tasks.
-
static readonly StartupTask CurrentGets the currently running StartupTask instance, if any.
-
TaskStatus StatusGets the current status of the StartupTask.
-
void Activate()Activates the StartupTask. This method is typically called by the system when the task is ready to run.
-
Task<void> DisableAsync()Asynchronously disables the StartupTask.
TaskStatus
Enumerates the possible states of a background task.
-
ReadyThe task is ready to be activated.
-
DisabledThe task has been disabled.
-
EnabledThe task is enabled but not currently running.
-
RunningThe task is currently executing.
-
CanceledThe task has been canceled.
StartupActivationInfo
Provides information about a startup activation event.
-
string TaskIdGets the identifier of the activated startup task.
-
TaskStatus TaskStatusGets the status of the activated startup task.