简体   繁体   English

Windows 10 文件浏览器弹出菜单显示新项目

[英]Windows 10 File Browser popup menu showing New items

Using: Visual Studio 2017 Windows Form C#使用:Visual Studio 2017 Windows 表格 C#

I know how to create a Popup menu displaying items that I have added with code to a native WinForm ContextMenuStrip control.我知道如何创建一个弹出菜单来显示我用代码添加到本机 WinForm ContextMenuStrip 控件的项目。

For example: My coded Popup menu例如:我的编码弹出菜单

What I am looking for and trying to achieve and I have not found so far is how to populate a ContextMenuStrip or any alternative control with the Items that show up when you right click on a blank space on File Explorer and select New and displays a list of the Items you can create base on what you have installed on your computer.我正在寻找并尝试实现但到目前为止我还没有找到的是如何使用当您右键单击文件资源管理器和 select 新并显示列表时显示的项目来填充 ContextMenuStrip 或任何替代控件您可以根据您在计算机上安装的内容创建的项目。

For example: File Explorer Popup Menu > New例如:文件资源管理器弹出菜单 > 新建

I have looked at many suggestion on different sites but they all show what I already know in how to add items manually and none explain how to add the Items that show up in the File Explorer New sub menu .我在不同站点上查看了许多建议,但它们都显示了我在如何手动添加项目方面已经知道的内容,并且没有解释如何添加显示在文件资源管理器新子菜单中的项目。

Could anyone tell me if this is even possible and/or point me to the right place.谁能告诉我这是否可能和/或将我指向正确的地方。

Regards,问候,

You're describing the problem as if it were some programming task, so most probably, it's not the thing you expect to see.您将问题描述为某种编程任务,因此很可能这不是您期望看到的。 Adding items to that menu is more of a problem of configuration of the almighty 'explorer.exe'..向该菜单添加项目更多是配置全能的“explorer.exe”的问题。

Please see here and read where to place item templates and how to register "file classes" for them in the registry.参阅此处并阅读项目模板的放置位置以及如何在注册表中为它们注册“文件类”。

I don't like answers like this that just drop a link to other resource, but it's not reasonable to copy&paste&redact it all not knowing if it's what you really want..我不喜欢这样的答案,只是删除指向其他资源的链接,但是复制&粘贴&编辑它是不合理的,不知道它是否是你真正想要的..

Also, note that if you see your desktop, then 'explorer.exe' is already running, and editing its configuration in the registry probably won't take any effect until this process is restarted.另外,请注意,如果您看到您的桌面,则说明“explorer.exe”已经在运行,并且在重新启动此过程之前,在注册表中编辑其配置可能不会生效。 Typically you get advices like in that article above:通常你会得到类似上面那篇文章的建议:

To have this change take effect, you need to restart your PC, not just sign out and back in.要使此更改生效,您需要重新启动 PC,而不仅仅是注销并重新登录。

But that's not true.但事实并非如此。 Just kill explorer.exe via task manager, and then start it back again.只需通过任务管理器杀死 explorer.exe,然后重新启动它。 No need to reboot.无需重新启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM