Menu and Toolbar Command Walkthroughs
注意
Beginning with Visual Studio 2008 SDK, use XML Command Table (.vsct) files instead of Visual Studio Command Table (.vsct) files to define how menus and commands appear in your VSPackages. For more information, see XML-Based Command Table Configuration (.vsct) Files.
You can add menus and toolbars to many different user interface (UI) elements of your VSPackage or the Visual Studio integrated development environment (IDE). The walkthroughs in this section lead you through the most common scenarios.
In This Section
Walkthrough: Creating a Top Level Menu (C#)
Demonstrates how to add a menu from a VSPackage to the same level as the top level menu items of the IDE (such as File, Edit, Help).Walkthrough: Creating a Cascading Submenu
Demonstrates how to add a submenu to an existing menu.Walkthrough: Creating an MRU Menu List
Demonstrates how to support a dynamic menu list in a submenu that is the basis of a Most Recently Used (MRU) menu.Walkthrough: Adding a Toolbar to the IDE
Demonstrates how to add a toolbar to the Visual Studio IDE.Walkthrough: Adding a Toolbar to a Tool Window
Demonstrates how to add a toolbar to a tool window.Walkthrough: Adding a Menu Controller to a Toolbar
Demonstrates how to add a menu controller to a toolbar. A menu controller is a button that contains a default command and an arrow that reveals a drop down menu list where additional commands can be selected.Walkthrough: Implementing a Context Menu in a Tool Window
Demonstrates how to add a context (that is, right-click) menu to the a tool window. In this case, a gradient service tool window.Walkthrough: Creating a Menu Command VSPackage
Demonstrates how to generate a VSPackage that puts a menu command on the Visual StudioTools menu.
Related Sections
Command Table Configuration (.Ctc) Files
Describes how to write and then compile a command table for your project.Menus and Toolbars
Explains how to create a UI that includes menus, toolbars, and command combo boxes.