OleMenuCommandService.ShowContextMenu Method (CommandID, Int32, Int32)

 

Shows the shortcut menu with the given command ID at the given location.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

override ShowContextMenu : 
        menuID:CommandID *
        x:int *
        y:int -> unit

Parameters

menuID
Type: System.ComponentModel.Design.CommandID

A command ID representing the shortcut menu to show.

x
Type: System.Int32

The horizontal position, in screen coordinates, of the top, left corner of the shortcut menu. If the shortcut menu does not fit on the screen, the operating system relocates it to fit.

y
Type: System.Int32

The vertical position, in screen coordinates, of the top, left corner of the shortcut menu. If the shortcut menu does not fit on the screen, the operating system relocates it to fit.

Exception Condition
ArgumentNullException

menuID is null.

This method shows a shortcut menu that has been tagged with the given command ID at the given location. A shortcut menu is always tagged with a command ID that defines it. Coordinates are global to the screen.

Return to top
Show: