JumpList.ShowRecentCategory Property

Definition

获取或设置一个值,该值指示最近使用的项是否显示在跳转列表中。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); };
public bool ShowRecentCategory { get; set; }
[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

Property Value

Boolean

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

Attributes

Examples

下面的示例演示了一个配置为显示 "最近" 类别的 JumpListThe 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">

Remarks

最新类别的内容由 Windows shell 管理。The contents of the Recent category are managed by the Windows shell. 若要在跳转列表中显示常用项,请将 ShowRecentCategory 属性设置为 trueTo 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.

Applies to