AppTaskInfo.Create(String, String, Uri, Uri, AppTaskContent) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新的應用程式任務,並符合指定參數。
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
參數
- title
-
String
Platform::String
winrt::hstring
工作的標題。 此值是必需的,並用來分組相關任務。
- subtitle
-
String
Platform::String
winrt::hstring
任務的可選副標題,提供更多背景資訊。 可以是空字串。
- content
- AppTaskContent
此任務的初始顯示內容是使用 AppTaskContent 工廠方法之一建立的。
傳回
一個新的 AppTaskInfo 物件,代表該任務。
- 屬性
備註
這很重要
應用程式任務支援將從 2026 年 5 月開始逐步推送至 Windows 11。 API Windows.UI.Shell.Tasks 所啟用的體驗要求對應的應用程式任務功能必須存在於該應用程式執行的 Windows 版本中。 否則,這些 API 將不會有任何影響。
必須提供標題;若未提供標題,此方法會拋出例外。