AppTaskContent.CreateSequenceOfSteps(String[], String) 方法

定义

创建显示任务进度的步骤序列的任务内容。

public:
 static AppTaskContent ^ CreateSequenceOfSteps(Platform::Array <Platform::String ^> ^ completedSteps, Platform::String ^ executingStep);
/// [Windows.Foundation.Metadata.Experimental]
 static AppTaskContent CreateSequenceOfSteps(winrt::array_view <winrt::hstring const&> const& completedSteps, winrt::hstring const& executingStep);
[Windows.Foundation.Metadata.Experimental]
public static AppTaskContent CreateSequenceOfSteps(string[] completedSteps, string executingStep);
function createSequenceOfSteps(completedSteps, executingStep)
Public Shared Function CreateSequenceOfSteps (completedSteps As String(), executingStep As String) As AppTaskContent

参数

completedSteps

String[]

Platform::String[]

winrt::hstring[]

表示已完成步骤的字符串数组。

executingStep
String

Platform::String

winrt::hstring

一个字符串,表示当前正在执行的步骤。

返回

显示分步进度的新 AppTaskContent 对象。

属性

注解

重要

从 2026 年 5 月开始,应用任务支持将逐步推出到 Windows 11。 API 启用 Windows.UI.Shell.Tasks 的体验要求在运行应用的 Windows 版本中存在相应的应用任务功能。 否则,这些 API 将没有任何影响。

此内容类型适用于处理一系列步骤的任务,例如 AI 代理工作流。 该任务不需要知道接下来将执行哪些步骤;它仅显示过去和当前进度。

适用于