Extend menus and commands
Commands are the way you add actions and processes to Visual Studio. In most cases commands are displayed on menus or toolbars. The VSPackage project template shows how to implement a very basic command. For a slightly longer but still basic implementation, see Create an extension with a menu command.
For more information about Visual Studio commands, menus, and toolbars, see Commands, menus, and toolbars.
Commands, menus, and toolbars are defined in the .vsct file that is part of VSPackage projects. You can find information about the Visual Studio IDE and the .vsct file in How VSPackages add user interface elements.
The following topics explain how to add different kinds of commands, menus, and toolbars.
In this section
Add a menu to the Visual Studio menu bar explains how to add a menu to the top Visual Studio menu bar.
Bind keyboard shortcuts to menu items explains how to add a keyboard shortcut (such as CTRL + 3) to a menu item.
Add a submenu to a menu explains how to add a submenu to the top menu.
Add a most recently used list to a submenu explains how to add a Most Recently Used list.
Create reusable groups of buttons describes how to group command items so that they can be included on multiple menus.
Add icons to menu commands describes how to add an icon to a command on both a toolbar and a menu.
Change the text of a menu command describes the use of the
TextChanges
flag to enable a menu item to be changed dynamically.Change the appearance of a command describes how to dynamically enable or disable a command.
Update the user interface describes how to force an update of the user interface to reflect recent changes.
Localize menu commands explains how to localize menu commands.