Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top