views:

148

answers:

1

Hello All,

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

A: 

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.

Groky
Sweet! That should do the trick.Thank you!
b34r