JumpList.ShowRecentCategory 属性

定义

获取或设置一个值,该值指示最近使用的项是否显示在跳转列表中。

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

属性值

Boolean

如果最近使用的项显示在跳转列表中,则为 true;否则为 false。 默认值为 false

属性

示例

以下示例演示 JumpList 配置为显示 “最近” 类别。 此示例是类概述中提供的大型示例的 JumpList 一部分。

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

注解

最近 类别的内容由 Windows shell 管理。 若要在跳转列表中显示常用项,请将 ShowRecentCategory 属性设置为 true

“最近”和 “频繁” 类别通常包含许多相同的跳转项。 因此,应用程序通常会在跳转列表中显示 “最近 ”或“ 频繁 ”类别,但不能同时显示这两者。

可以调用AddToRecentCategory该方法来请求Windows shell 将项添加到 “最近”项列表中。 如果应用程序未注册以处理项的文件名类型,则它不会显示在 “最近” 列表中,调用 AddToRecentCategory 将无提示失败。

适用于