Implements the System.ComponentModel.Design.IMenuCommandService interface.
See Also: MenuCommandService Members
The System.ComponentModel.Design.MenuCommandService class implements the System.ComponentModel.Design.IMenuCommandService interface, which is the managed interface used to add handlers for menu commands and to define verbs.
The System.ComponentModel.Design.MenuCommandService 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 System.ComponentModel.Design.IMenuCommandService interface.
The System.ComponentModel.Design.MenuCommandService class utilizes several other services. All of these services are optional, so the behavior of the System.ComponentModel.Design.MenuCommandService class degrades if one or more services are missing. The following table shows which services are used and for what purpose.
System.ComponentModel.Design.ISelectionService |
Used to discover the current selection in order to obtain verbs offered by the currently selected designer. |
System.ComponentModel.Design.IDesignerHost |
Used to obtain the designer for the currently selected component, if any. |
Microsoft.VisualStudio.Shell.Interop.IVsUIShell |
Used to notify vsprvs that the command status has changed. |
Microsoft.VisualStudio.Shell.Interop.IOleComponentUIManager |
Used to show context menus. |