在 WPF 中使用 Windows 资源管理器上下文菜单

发布于 2024-08-22 10:18:54 字数 260 浏览 1 评论 0原文

有没有办法访问 Windows 资源管理器 shell 上下文菜单中的文件和文件?文件夹而不使用完整的资源管理器嵌入式控件?

我的困境的要点是:我有一个 Viewport3D,它显示一些原始文件和文件。文件夹。基本上,它就像您见过的所有其他 3d 资源管理器替代品一样:)
当我右键单击这些条目之一时,我希望看到该文件弹出的资源管理器上下文菜单。
我可以从 Windows 获取该上下文菜单,还是必须构建自己的菜单?

预先感谢,

_b34r

Is there a way to gain access to the Windows Explorer shell context menus for files & folders without using a complete Explorer drop-in control?

The gist of my plight is this: I have a Viewport3D that displays a handful of raw files & folders. Basically, it's like every other 3d explorer replacement you've ever seen :)
When I right-click one of these entries, I'd like to see the Explorer context menu for that file pop up.
Can I get that context menu from Windows, or do I have to construct my own?

Thanks in advance,

_b34r

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

远昼 2024-08-29 10:18:54

这个库中的 ShellContextMenu 类几乎可以满足您的要求:

http://gong-shell.sourceforge.net/< /a>

唯一的问题是它需要 WinForms Control。但是,如果您修改库以添加接受 hWnd 的附加 ShowContextMenu 方法,则您应该能够传递顶级 WPF 窗口的 hWnd。

The ShellContextMenu class in this library almost does what you want:

http://gong-shell.sourceforge.net/

Only thing is that it expects WinForms Control. However, if you modify the library to add an addtional ShowContextMenu method which accepts a hWnd, you should be able to pass is the hWnd of your top-level WPF Window.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文