Canceled event

IBackgroundTaskInstance.Canceled event

[ Updated for UWP apps on Windows 10. For Windows 8.x articles, see the archive ]

Attaches a cancellation event handler to the background task instance.

Note  For Windows Phone Store apps, if the device becomes low on memory, background tasks may be terminated without any warning and without raising the OnCanceled event. This helps to ensure the user experience of the app in the foreground. Your background task should be designed to handle this scenario.

Syntax


event BackgroundTaskCanceledEventHandler Canceled

Event information

Delegate BackgroundTaskCanceledEventHandler

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel.Background
Windows::ApplicationModel::Background [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.ApplicationModel.Background
Windows::ApplicationModel::Background [C++]

Metadata

Windows.winmd

See also

IBackgroundTaskInstance

 

 

Show:
© 2016 Microsoft