XamlRenderingBackgroundTask.OnRun(IBackgroundTaskInstance) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs the work of the background task. The system calls this method when the associated background task has been triggered.
protected:
virtual void OnRun(IBackgroundTaskInstance ^ taskInstance) = OnRun;
void OnRun(IBackgroundTaskInstance const& taskInstance);
protected virtual void OnRun(IBackgroundTaskInstance taskInstance);
function onRun(taskInstance)
Protected Overridable Sub OnRun (taskInstance As IBackgroundTaskInstance)
Parameters
- taskInstance
- IBackgroundTaskInstance
An interface to an instance of the background task. The system creates this instance when the task has been triggered to run.
Remarks
Important
To keep the memory footprint of the background task as low as possible, this task should be implemented in a C++ Windows Runtime Component for Windows Phone. The memory footprint will be higher if written in C# and will cause out of memory exceptions on low-memory devices which will terminate the background task. For more information on memory constraints, see Support your app with background tasks.