在 WPF 中使用 Windows 资源管理器上下文菜单
有没有办法访问 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个库中的 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.