AppTaskState Enum

Definition

Defines constants that specify the state of the app task.

public enum class AppTaskState
/// [Windows.Foundation.Metadata.ContractVersion(Windows.UI.Shell.Tasks.AppTaskContract, 65536)]
/// [Windows.Foundation.Metadata.Experimental]
enum class AppTaskState
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.UI.Shell.Tasks.AppTaskContract), 65536)]
[Windows.Foundation.Metadata.Experimental]
public enum AppTaskState
var value = Windows.UI.Shell.Tasks.AppTaskState.running
Public Enum AppTaskState
Inheritance
AppTaskState
Attributes

Windows requirements

Requirements Description
Device family
Windows Desktop Extension SDK (introduced in 10.0.26100.0)
API contract
Windows.UI.Shell.Tasks.AppTaskContract (introduced in v2.0)

Fields

Name Value Description
Running 0

The task is actively executing.

Completed 1

The task has finished execution successfully.

NeedsAttention 2

The task needs user input to continue.

Paused 3

The task execution is suspended but can be resumed without user intervention.

Error 4

The task completed with an error state.

Remarks

Important

App task support will start gradually rolling out to Windows 11 starting May, 2026. The experiences enabled by Windows.UI.Shell.Tasks APIs require that the corresponding app task feature be present in the version of Windows where the app runs. Otherwise, these APIs will not have any effect.

Applies to