JumpList.JumpItems JumpList.JumpItems JumpList.JumpItems JumpList.JumpItems Property


获取在跳转列表中显示的 JumpItem 对象的集合。Gets the collection of JumpItem objects that are displayed in the Jump List.

 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 对象的集合。The collection of JumpItem objects displayed in the Jump List. 默认值为空集合。The default is an empty collection.


下面的示例演示如何获取当前JumpList并清除JumpItems集合的内容。The following example shows how to get the current JumpList and clear the contents of the JumpItems collection. 然后调用JumpList方法以将更改应用于 Windows shell。 ApplyThe Apply method is then called to apply the JumpList changes to the Windows shell. 此示例是JumpList类概述中提供的一个更大示例的一部分。This example is part of a larger example available in the JumpList class overview.

private void ClearJumpList(object sender, RoutedEventArgs e)
    JumpList jumpList1 = JumpList.GetJumpList(App.Current);


跳转列表可以包含两种类型的项JumpTaskJumpPath和。Jump Lists can contain two types of items, a JumpTask and a JumpPath. 是指向程序的链接JumpPath ,而是指向文件的链接。 JumpTaskA JumpTask is a link to a program and a JumpPath is a link to a file.

JumpList创建时JumpItems ,集合为空。When a JumpList is created, the JumpItems collection is empty. 可以将任何JumpTaskJumpPath对象添加到集合。You can add any JumpTask or JumpPath objects to the collection. 集合将只包含程序添加的项。The collection will only contain items that have been added by your program. 当成功调用EndInit JumpItemsApply方法传递到 Windows shell 后,该集合将仅包含已成功添加到任务栏跳转列表中的项。 JumpListAfter the JumpList has been passed to the Windows shell by a successful call to either the EndInit or Apply methods, the JumpItems collection will contain only the items that were successfully added to the taskbar Jump List. 将从JumpItems集合中删除未成功添加的项。Items that were not successfully added are removed from the JumpItems collection. 可以通过JumpItemsRejectedJumpItemsRemovedByUser事件的事件处理程序访问已删除项的列表。You can access the lists of removed items through event handlers for the JumpItemsRejected and JumpItemsRemovedByUser events.