IMenuCommandService.ShowContextMenu(CommandID, Int32, Int32) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Shows the specified shortcut menu at the specified location.
public:
void ShowContextMenu(System::ComponentModel::Design::CommandID ^ menuID, int x, int y);
public void ShowContextMenu (System.ComponentModel.Design.CommandID menuID, int x, int y);
abstract member ShowContextMenu : System.ComponentModel.Design.CommandID * int * int -> unit
Public Sub ShowContextMenu (menuID As CommandID, x As Integer, y As Integer)
- x
- Int32
The x-coordinate at which to display the menu, in screen coordinates.
- y
- Int32
The y-coordinate at which to display the menu, in screen coordinates.
The ShowContextMenu method can display any of the following Visual Studio shortcut menus containing menu commands at a specified point:
Menu | CommandID |
---|---|
The shortcut menu displayed for a container | ContainerMenu |
The shortcut menu displayed for the component tray | ComponentTrayMenu |
The shortcut menu displayed for a selection | SelectionMenu |
The shortcut menu displayed for a tray selection | TraySelectionMenu |
This method can also display other registered shortcut menus.
Product | Versies |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET-feedback
.NET is een open source project. Selecteer een koppeling om feedback te geven: