Implements the IMenuCommandService interface.
Assembly: System.Design (in System.Design.dll)
Thetype exposes the following members.
|AddCommand||Adds a command handler to the menu command service.|
|AddVerb||Adds a verb to the verb table of the .|
|Dispose()||Releases all resources used by the .|
|Dispose(Boolean)||Releases all resources used by the .|
|EnsureVerbs||Ensures that the verb list has been created.|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|FindCommand(CommandID)||Searches for the MenuCommand associated with the given command ID.|
|FindCommand(Guid, Int32)||Searches for the MenuCommand associated with the given command.|
|GetCommandList||Gets the command list for a given GUID.|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetService||Gets a reference to the requested service.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|GlobalInvoke(CommandID)||Invokes the given command on the local form or in the global environment.|
|GlobalInvoke(CommandID, Object)||Invokes the given command with the given parameter on the local form or in the global environment.|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|OnCommandsChanged||Raises the MenuCommandsChanged event.|
|RemoveCommand||Removes the given menu command from the document.|
|RemoveVerb||Removes the given verb from the document.|
|ShowContextMenu||Shows the shortcut menu with the given command ID at the given location.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
The class implements the IMenuCommandService interface, which is the managed interface used to add handlers for menu commands and to define verbs.
The class is automatically offered by the package class to offer global commands for an entire package, and it is also offered by the Microsoft.VisualStudio.Shell.WindowPane class to offer commands for the current window. This offering is always done through the service container, so anyone deriving from the package or window pane classes can remove or replace the default implementation of the IMenuCommandService interface.
The class utilizes several other services. All of these services are optional, so the behavior of the class degrades if one or more services are missing. The following table shows which services are used and for what purpose.
Used to discover the current selection in order to obtain verbs offered by the currently selected designer.
Used to obtain the designer for the currently selected component, if any.
Used to notify Visual Studio that the command status has changed.
Used to show context menus.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)