XamlRenderingBackgroundTask
XamlRenderingBackgroundTask
XamlRenderingBackgroundTask
XamlRenderingBackgroundTask
Class
Definition
Provides the ability to create a bitmap from a XAML tree in a background task.
public : class XamlRenderingBackgroundTask : IXamlRenderingBackgroundTask, IXamlRenderingBackgroundTaskOverridespublic class XamlRenderingBackgroundTask : IXamlRenderingBackgroundTask, IXamlRenderingBackgroundTaskOverridesPublic Class XamlRenderingBackgroundTask Implements IXamlRenderingBackgroundTask, IXamlRenderingBackgroundTaskOverrides// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
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.
Constructors
XamlRenderingBackgroundTask() XamlRenderingBackgroundTask() XamlRenderingBackgroundTask() XamlRenderingBackgroundTask()
Initializes a new instance of the XamlRenderingBackgroundTask class.
protected : XamlRenderingBackgroundTask()protected XamlRenderingBackgroundTask()Protected Sub New()// This API is not available in Javascript.
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.
Methods
OnRun(IBackgroundTaskInstance) OnRun(IBackgroundTaskInstance) OnRun(IBackgroundTaskInstance) OnRun(IBackgroundTaskInstance)
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)protected virtual void OnRun(IBackgroundTaskInstance taskInstance)Protected Overridable Function OnRun(taskInstance As IBackgroundTaskInstance) As void// This API is not available in Javascript.
- taskInstance
- IBackgroundTaskInstance IBackgroundTaskInstance IBackgroundTaskInstance 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.