AppTaskInfo.Create(String, String, Uri, Uri, AppTaskContent) Method

Definition

Creates a new app task with the specified parameters.

public:
 static AppTaskInfo ^ Create(Platform::String ^ title, Platform::String ^ subtitle, Uri ^ deepLink, Uri ^ iconUri, AppTaskContent ^ content);
/// [Windows.Foundation.Metadata.Experimental]
 static AppTaskInfo Create(winrt::hstring const& title, winrt::hstring const& subtitle, Uri const& deepLink, Uri const& iconUri, AppTaskContent const& content);
[Windows.Foundation.Metadata.Experimental]
public static AppTaskInfo Create(string title, string subtitle, System.Uri deepLink, System.Uri iconUri, AppTaskContent content);
function create(title, subtitle, deepLink, iconUri, content)
Public Shared Function Create (title As String, subtitle As String, deepLink As Uri, iconUri As Uri, content As AppTaskContent) As AppTaskInfo

Parameters

title
String

Platform::String

winrt::hstring

The title of the task. This value is required and is used to group related tasks.

subtitle
String

Platform::String

winrt::hstring

An optional subtitle for the task that provides additional context. Can be an empty string.

deepLink
Uri Uri

A URI that launches the app in the context of this task when the user clicks on the task representation in the Shell.

iconUri
Uri Uri

The path to an icon that represents the task.

content
AppTaskContent

The initial content to display for this task, created using one of the AppTaskContent factory methods.

Returns

A new AppTaskInfo object that represents the task.

Attributes

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.

The title is required; this method throws an exception if the title is not provided.

Applies to

See also