Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface System.​ComponentModel.​Design.​IMenuCommandService

Assembly: System.ComponentModel.TypeConverter

Provides methods to manage the global designer verbs and menu commands available in design mode, and to show some types of shortcut menus.

Properties

Gets a collection of the designer verbs that are currently available.

Methods

void
AddCommand​(MenuCommand command)
Adds the specified standard menu command to the menu.
command The <see cref="T:System.ComponentModel.Design.MenuCommand" /> to add.
void
AddVerb​(DesignerVerb verb)
Adds the specified designer verb to the set of global designer verbs.
verb The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to add.
FindCommand​(CommandID commandID)
Searches for the specified command ID and returns the menu command associated with it.
Returns The <see cref="T:System.ComponentModel.Design.MenuCommand" /> associated with the command ID, or <see langword="null" /> if no command is found.
commandID The <see cref="T:System.ComponentModel.Design.CommandID" /> to search for.
bool
GlobalInvoke​(CommandID commandID)
Invokes a menu or designer verb command matching the specified command ID.
Returns <see langword="true" /> if the command was found and invoked successfully; otherwise, <see langword="false" /> .
commandID The <see cref="T:System.ComponentModel.Design.CommandID" /> of the command to search for and execute.
void
RemoveCommand​(MenuCommand command)
Removes the specified standard menu command from the menu.
command The <see cref="T:System.ComponentModel.Design.MenuCommand" /> to remove.
void
RemoveVerb​(DesignerVerb verb)
Removes the specified designer verb from the collection of global designer verbs.
verb The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to remove.
void
ShowContextMenu​(CommandID menuID, int x, int y)
Shows the specified shortcut menu at the specified location.
menuID The <see cref="T:System.ComponentModel.Design.CommandID" /> for the shortcut menu to show.
x The x-coordinate at which to display the menu, in screen coordinates.
y The y-coordinate at which to display the menu, in screen coordinates.