We recommend using Visual Studio 2017

Walkthroughs for User Interface Elements


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

Adding a Menu to the Visual Studio Menu Bar

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).

Adding a Submenu to a Menu

Demonstrates how to add a submenu to an existing menu.

Adding a Most Recently Used List to a Submenu

Demonstrates how to support a dynamic menu list in a submenu that is the basis of a Most Recently Used (MRU) menu.

Adding a Toolbar

Demonstrates how to add a toolbar to the Visual Studio IDE.

Adding a Toolbar to a Tool Window

Demonstrates how to add a toolbar to a tool window.

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.

Dynamically Adding Menu Items

Demonstrates how to add menu items dynamically.

Adding a Shortcut Menu in a Tool Window

Demonstrates how to add a context (that is, right-click) menu to a tool window. In this case, a gradient service tool window.

Related Sections

Visual Studio Command Table (.Vsct) Files

Describes how to prepare a Visual Studio command table for your project.

Walkthroughs for Customizing Visual Studio By Using VSPackages

Introductory walkthroughs for adding UI elements to Visual Studio.

Commands, Menus, and Toolbars

Explains how to create a UI that includes menus, toolbars, and command combo boxes.