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();
}

備註

跳躍清單可以包含兩種類型的專案:和 JumpTaskJumpPathJumpTask是程式的連結,而 JumpPath 是檔案的連結。

JumpList建立 時,集合是空的 JumpItems 。 您可以將任何 JumpTaskJumpPath 物件加入至集合。 集合只會包含程式已新增的專案。 JumpList成功呼叫 EndInitApply 方法將 傳遞至 Windows 殼層之後, JumpItems 集合將只包含已成功新增至工作列快捷方式清單的專案。 未成功新增的專案會從 JumpItems 集合中移除。 您可以透過 和 JumpItemsRemovedByUser 事件的事件處理常式 JumpItemsRejected 來存取已移除的專案清單。

適用於