JumpList.ShowRecentCategory JumpList.ShowRecentCategory JumpList.ShowRecentCategory JumpList.ShowRecentCategory Property

定义

获取或设置一个值,该值指示最近使用的项是否显示在跳转列表中。Gets or sets a value that indicates whether recently used items are displayed in the Jump List.

public:
 property bool ShowRecentCategory { bool get(); void set(bool value); };
[get: System.Security.SecurityCritical]
[set: System.Security.SecurityCritical]
public bool ShowRecentCategory { get; set; }
member this.ShowRecentCategory : bool with get, set
Public Property ShowRecentCategory As Boolean

属性值

如果最近使用的项显示在跳转列表中,则为 true;否则为 falsetrue if recently used items are displayed in the Jump List; otherwise, false. 默认值为 falseThe default is false.

示例

下面的示例演示了JumpList一个配置为显示 "最近" 类别的。The following example shows a JumpList configured to show the Recent category. 此示例是JumpList类概述中提供的一个更大示例的一部分。This example is part of a larger example available in the JumpList class overview.

<JumpList ShowRecentCategory="True"
          ShowFrequentCategory="True"
          JumpItemsRejected="JumpList_JumpItemsRejected"
          JumpItemsRemovedByUser="JumpList_JumpItemsRemovedByUser">

注解

最新类别的内容由 Windows shell 管理。The contents of the Recent category are managed by the Windows shell. 若要在跳转列表中显示经常使用的项ShowRecentCategory ,请true将属性设置为。To display frequently used items in the Jump List, set the ShowRecentCategory property to true.

最近频繁的类别通常包含多个相同的跳转项。The Recent and Frequent categories often contain many of the same jump items. 因此,应用程序通常会在跳转列表中显示 "最近" 或 "常用" 类别,但不能同时显示两者。As a result, applications typically display either the Recent or the Frequent category in the Jump List, but not both.

您可以调用AddToRecentCategory方法来请求 Windows shell 向 "最近使用的项" 列表中添加项。You can call the AddToRecentCategory method to request that the Windows shell add items to the Recent items list. 如果你的应用程序未注册为处理该项的文件名类型,则它不会显示在 "最近" 列表中,并且AddToRecentCategory对的调用将无提示地失败。If your application is not registered to handle the file name type of the item, it will not appear in the Recent list and calls to AddToRecentCategory will fail silently.

适用于