Default Commands, Groups, and Toolbars

For product uniformity and stability, the UI displays certain command groups by default, and Visual Studio provides definitions for commands and command groups. VSPackages can also use the standard commands and command groups.

The default command groups fall into three categories: IDE commands, product commands, and editor commands.

Nota

Beginning with Visual Studio 2008 SDK, use XML Command Table (.vsct) files instead of command table configuration (.ctc) files to define how menus and commands appear in your VSPackages. For more information, see XML-Based Command Table Configuration (.vsct) Files.

Default IDE Commands

The default IDE toolbar includes commands shared by all products contained in Visual Studio. These include commands relating to generic project operations, such as the Save command and the Add Item command. VSPackages should not add to or subtract from this toolbar, with one exception: If the product or VSPackage adds a new tool window, then the window should be added to the list of available tool windows on the View menu. New products or VSPackages can add their own toolbar.

Default Product Commands

Each product can provide the IDE with its own default toolbar that contains important and frequently used commands. It is best, however, to use existing menus and toolbars whenever possible and supplement them with other task-specific toolbars as needed.

The priority field for a toolbar determines its row placement. Zero priority places the toolbar on the third row (row 3), beneath the menu bar (row 1) and the Standard toolbar (row 2). Therefore, other toolbars appear at row (priority+ 3). Subsequent toolbars are placed on the same row, if there is room; otherwise, they are automatically moved to the next row.

Default Editor Commands

A product or an editor of a VSPackage, when selected, should provide a default toolbar that contains the editor's important and frequently used commands. The editor's toolbar should appear when the editor is active and should be hidden when the editor is not active. This visibility is controlled in the VISIBILITY_SECTION – VISIBILITY_END section of the command table configuration file.

Editor toolbars should be placed below IDE and product toolbars.

See Also

Concepts

IDE-Defined Commands

How VSPackages Add User Interface Elements

Designing Command Table Configuration Files