Click or drag to resize

ShellContextMenuProvider Class

Class that allows to show and execute shell context menus.
Inheritance Hierarchy
SystemObject
  Jam.ShellWin32ShellContextMenuProvider
    Jam.Shell.WPF.ControlsShellContextMenuProvider

Namespace:  Jam.Shell.WPF.Controls
Assembly:  ShellBrowserWPF (in ShellBrowserWPF.dll) Version: 1.3.1
Syntax
public class ShellContextMenuProvider : Win32ShellContextMenuProvider

The ShellContextMenuProvider type exposes the following members.

Constructors
  NameDescription
Public methodShellContextMenuProvider(ItemIdList)
Creates a context menu for the passed ItemIdList.
Public methodShellContextMenuProvider(JamItemIdListCollection)
Creates a context menu for the passed JamItemIdListCollection.
Top
Properties
  NameDescription
Public propertyAsyncOperation
Gets or sets a value indicating whether context menu operations are executed asynchronously.
(Inherited from Win32ShellContextMenuProvider.)
Public propertyCustomMenu
Gets or sets the custom menu.
Protected propertyShellMenuStartsAt
Gets or sets a position of the first item of the shell menu.
(Inherited from Win32ShellContextMenuProvider.)
Public propertyShowShellContextMenuOnTop
Defines the order of ShellContextMenu and CustomMenu.
Public propertySourceItems
Gets or sets source items.
(Inherited from Win32ShellContextMenuProvider.)
Top
Methods
  NameDescription
Protected methodCreatePopupMenu
Creates popup menu.
(Overrides Win32ShellContextMenuProviderCreatePopupMenu.)
Public methodExecuteCommand(ShellCommand)
Executes the command operation on the SourceItems .
(Inherited from Win32ShellContextMenuProvider.)
Public methodExecuteCommand(ShellContextMenuCommand) Obsolete.
Executes the command operation on the SourceItems.
(Inherited from Win32ShellContextMenuProvider.)
Protected methodHandleMenuItem
Handles the menu item described by pCommandId.
(Overrides Win32ShellContextMenuProviderHandleMenuItem(Int32).)
Protected methodOnAfterCommandExecute
Executes the AfterCommandExecute event.
(Inherited from Win32ShellContextMenuProvider.)
Protected methodOnBeforeCommandExecute
Executes the BeforeCommandExecute event.
(Inherited from Win32ShellContextMenuProvider.)
Protected methodOnRenameItemSelected
Fires the RenameItemSelected event
(Inherited from Win32ShellContextMenuProvider.)
Protected methodRelease
Releases this object.
(Inherited from Win32ShellContextMenuProvider.)
Public methodShowContextMenu
Shows the context menu at the specified location and executes the menu item the user has chosen.
(Inherited from Win32ShellContextMenuProvider.)
Top
Events
  NameDescription
Public eventAfterCommandExecute
This event is fired after a command that was selected from the context menu or passed to ExecuteCommand(ShellContextMenuCommand) is processed.
(Inherited from Win32ShellContextMenuProvider.)
Public eventBeforeCommandExecute
This event is fired before a command that was selected from the context menu or passed to ExecuteCommand(ShellContextMenuCommand) is processed.
(Inherited from Win32ShellContextMenuProvider.)
Public eventRenameItemSelected
This event is fired when the context menu option "Rename" is selected from the context menu or passed to ExecuteCommand(ShellContextMenuCommand).
(Inherited from Win32ShellContextMenuProvider.)
Top
Remarks
Compared to the ShellContextMenu this class can be used standalone in code.
Examples
The following example illustrates the simple usage.
C#
new ShellContextMenuProvider(new ItemIdList(@"c:\windows").ExecuteCommand(ShellContextMenuCommand.Open);
See Also