C# .NET 跳转列表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/466726/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-04 04:32:25  来源:igfitidea点击:

.NET Jump List

c#.netwindows-7

提问by Jake Pearson

Is there a .NET library/tutorial available that will let me show me how to customize the Windows 7 Jump List for my application?

是否有可用的 .NET 库/教程可以让我向我展示如何为我的应用程序自定义 Windows 7 跳转列表?

采纳答案by Sampson

channel9.msdn.com did a series of discussions covering the new taskbar, including the jumplist.

channel9.msdn.com 做了一系列关于新任务栏的讨论,包括跳转列表。

Jump Into Windows 7 Taskbar Jump Lists

跳转到 Windows 7 任务栏跳转列表

Additionally, The Windows 7 Blog started a series of posts that covering developing the task-bar, including how to work with jump-lists. You can view their initial post at http://blogs.msdn.com/yochay/archive/2009/01/06/windows-7-taskbar-part-1-the-basics.aspx

此外,Windows 7 博客还发布了一系列涵盖开发任务栏的文章,包括如何使用跳转列表。您可以在http://blogs.msdn.com/yochay/archive/2009/01/06/windows-7-taskbar-part-1-the-basics.aspx查看他们的初始帖子

回答by Jake Pearson

Also it looks like this question has already been answered: Another Article

看起来这个问题已经得到了回答: 另一篇文章

And here is the simplest way to fill your jump list with the contents of your app's recent files list (Thanks Code Project!:

这是使用应用程序最近文件列表的内容填充跳转列表的最简单方法(感谢代码项目!

    void AddFileToRecentFilesList(string fileName)
    {
        SHAddToRecentDocs((uint)ShellAddRecentDocs.SHARD_PATHW, fileName);          
    }

    /// <summary>
    /// Native call to add the file to windows' recent file list
    /// </summary>
    /// <param name="uFlags">Always use (uint)ShellAddRecentDocs.SHARD_PATHW</param>
    /// <param name="pv">path to file</param>
    [DllImport("shell32.dll")]
    public static extern void SHAddToRecentDocs(UInt32 uFlags,
        [MarshalAs(UnmanagedType.LPWStr)] String pv);

    enum ShellAddRecentDocs
    {
        SHARD_PIDL = 0x00000001,
        SHARD_PATHA = 0x00000002,
        SHARD_PATHW = 0x00000003
    }

回答by Jamie Penney

See here Windows Team Blog. Microsoft are working on .Net wrappers for a lot of the new Windows 7 features.

请参阅此处的Windows 团队博客。Microsoft 正在为许多新的 Windows 7 功能开发 .Net 包装器。

回答by Luke

Windows 7 API Code Pack contains the official implementation for .NET, see http://code.msdn.microsoft.com/WindowsAPICodePack

Windows 7 API 代码包包含 .NET 的官方实现,请参阅http://code.msdn.microsoft.com/WindowsAPICodePack

回答by Alex

Starting from .NET 4.0 JumpLists can be used easily with System.Windows.Shellnamespace.

从 .NET 4.0 开始,JumpLists 可以很容易地与System.Windows.Shell命名空间一起使用。

See reference and code examples at Microsoft's official JumpList Class documentation.

请参阅 Microsoft 官方JumpList 类文档中的参考和代码示例。