JumpList.AddToRecentCategory 方法 (String)

将指定的项路径添加到跳转列表的**“最近”**类别中。

命名空间:  Microsoft.Windows.Shell
程序集:  Microsoft.Windows.Shell(在 Microsoft.Windows.Shell.dll 中)

语法

声明
Public Shared Sub AddToRecentCategory ( _
    itemPath As String _
)
public static void AddToRecentCategory(
    string itemPath
)
public:
static void AddToRecentCategory(
    String^ itemPath
)
static member AddToRecentCategory : 
        itemPath:string -> unit 
public static function AddToRecentCategory(
    itemPath : String
)

参数

  • itemPath
    类型:System.String
    要添加到跳转列表中的路径。

备注

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

您可以调用 AddToRecentCategory(String) 方法来请求 Windows shell 将项路径添加到**“最近”项列表中。 如果您的应用程序未注册为处理该项的文件类型,它将不会出现在“最近”**列表中,并且对 AddToRecentCategory(String) 的调用将静默失败。

.NET Framework 安全性

请参见

参考

JumpList 类

AddToRecentCategory 重载

Microsoft.Windows.Shell 命名空间

ShowRecentCategory