MSDN Documentation

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 Current
    Gets the currently running StartupTask instance, if any.
  • TaskStatus Status
    Gets 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.

  • Ready
    The task is ready to be activated.
  • Disabled
    The task has been disabled.
  • Enabled
    The task is enabled but not currently running.
  • Running
    The task is currently executing.
  • Canceled
    The task has been canceled.

StartupActivationInfo

Provides information about a startup activation event.

  • string TaskId
    Gets the identifier of the activated startup task.
  • TaskStatus TaskStatus
    Gets the status of the activated startup task.