WebUIBackgroundTaskInstanceRuntimeClass WebUIBackgroundTaskInstanceRuntimeClass WebUIBackgroundTaskInstanceRuntimeClass WebUIBackgroundTaskInstanceRuntimeClass WebUIBackgroundTaskInstanceRuntimeClass Class


Provides access to an instance of a background task.


A background task must explicitly call the Web Workers close method to terminate itself after the task has completed.

public : sealed class WebUIBackgroundTaskInstanceRuntimeClass : IBackgroundTaskInstance, IWebUIBackgroundTaskInstance
struct winrt::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass : IBackgroundTaskInstance, IWebUIBackgroundTaskInstance
public sealed class WebUIBackgroundTaskInstanceRuntimeClass : IBackgroundTaskInstance, IWebUIBackgroundTaskInstance
Public NotInheritable Class WebUIBackgroundTaskInstanceRuntimeClass Implements IBackgroundTaskInstance, IWebUIBackgroundTaskInstance
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


To retrieve this object, use the WebUIBackgroundTaskInstance.current property.


: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX)



InstanceId InstanceId InstanceId InstanceId InstanceId

Gets the instance ID of the background task instance.

Progress Progress Progress Progress Progress

Gets or sets progress status for a background task instance.

Succeeded Succeeded Succeeded Succeeded Succeeded

Gets or sets the success value for the background task. The success value is what is returned to the foreground instance of your app in the completed event.

SuspendedCount SuspendedCount SuspendedCount SuspendedCount SuspendedCount

Gets the number of times resource management policy caused the background task to be suspended.

Task Task Task Task Task

Gets access to the registered background task for this background task instance.

TriggerDetails TriggerDetails TriggerDetails TriggerDetails TriggerDetails

Gets additional information associated with a background task instance.


GetDeferral() GetDeferral() GetDeferral() GetDeferral() GetDeferral()

Informs the system that the background task might continue to perform work after the IBackgroundTask.Run method returns. This method is not applicable to JavaScript background tasks.


Canceled Canceled Canceled Canceled Canceled

Attaches a cancellation event handler to the background task instance.