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 将没有任何影响。
游戏是必需的;如果未提供游戏,此方法将引发异常。