Using Windows Explorer context menus in WPF

Is there a way to access the context menu of the Windows Explorer shell for files and folders without using full control over Explorer Explorer?

The essence of my situation is as follows: I have Viewport3D, which displays several raw files and folders. Essentially, this is like any other 3d explorer replacement you have ever seen :)
When I right-clicked on one of these entries, I would like the Explorer context menu for this file to pop up.
Can I get this context menu from Windows, or do I need to build my own?

Thanks in advance,

_b34r

+4
source share
1 answer

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

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

The only thing that awaits WinForms Control. However, if you modify the library to add an additional ShowContextMenu method that accepts hWnd, you should be able to pass the hWnd of your top-level WPF window.

+1
source

Source: https://habr.com/ru/post/1301590/


All Articles