語言

JumpList.JumpItems 屬性

定義

取得顯示在跳躍清單中的物件集合 JumpItem 。

public:
 property System::Collections::Generic::List<System::Windows::Shell::JumpItem ^> ^ JumpItems { System::Collections::Generic::List<System::Windows::Shell::JumpItem ^> ^ get(); };
public System.Collections.Generic.List<System.Windows.Shell.JumpItem> JumpItems { get; }
member this.JumpItems : System.Collections.Generic.List<System.Windows.Shell.JumpItem>
Public ReadOnly Property JumpItems As List(Of JumpItem)

屬性值

跳轉清單中顯示的物件集合 JumpItem 。 預設是空集合。

範例

以下範例說明如何取得當前值 JumpList 並清除集合內容 JumpItems 。 接著呼叫該 Apply 方法將變更套用 JumpList 到 Windows 殼層。 此範例是類別概述中較大範例 JumpList 的一部分。

private void ClearJumpList(object sender, RoutedEventArgs e)
{
    JumpList jumpList1 = JumpList.GetJumpList(App.Current);
    jumpList1.JumpItems.Clear();
    jumpList1.Apply();
}

備註

跳轉清單可以包含兩種項目,分別為 a JumpTask 和 JumpPath。 A JumpTask 是程式的連結,a JumpPath 是檔案的連結。

當 a JumpList 被建立時,集合 JumpItems 是空的。 你可以將任何 JumpTask 物件 JumpPath 加入收藏。 該收藏只會包含由你的程式新增的項目。 當 JumpList 透過成功呼叫 EndInit 或 Apply 方法傳入 Windows shell 後,JumpItems 集合將只包含成功加入工作列跳轉清單的項目。 未成功新增的項目將從收藏中移除 JumpItems 。 你可以透過事件處理工具JumpItemsRejectedJumpItemsRemovedByUser存取移除項目清單。

適用於