AppTaskResultAsset(String, String, Uri, Uri) Constructor

Definition

Creates a new instance of AppTaskResultAsset with the specified parameters.

public:
 AppTaskResultAsset(Platform::String ^ name, Platform::String ^ context, Uri ^ iconUri, Uri ^ assetUri);
/// [Windows.Foundation.Metadata.Experimental]
 AppTaskResultAsset(winrt::hstring const& name, winrt::hstring const& context, Uri const& iconUri, Uri const& assetUri);
[Windows.Foundation.Metadata.Experimental]
public AppTaskResultAsset(string name, string context, System.Uri iconUri, System.Uri assetUri);
function AppTaskResultAsset(name, context, iconUri, assetUri)
Public Sub New (name As String, context As String, iconUri As Uri, assetUri As Uri)

Parameters

name
String

Platform::String

winrt::hstring

The display name of the asset shown to the user (for example, "ResultStudy.txt").

context
String

Platform::String

winrt::hstring

Additional context displayed next to the asset name (for example, "Generated content").

iconUri
Uri Uri

The URI of an icon that represents the asset. Supports ms-appx:///, ms-appdata:///, and absolute file paths.

assetUri
Uri Uri

The URI of the generated asset (for example, a file path).

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.

Applies to