sixue
sixue

Reputation: 1

Visual Studio add-in : How to add a command to visual studio's tab context menu?

I've built a Visual Studio 2008 add-in . I want to add a command to the context menu of the code window's tab . The thing I didn't know is how to get the tab context menu in this way:

CommandBars cmdBars = (CommandBars)(_applicationObject.CommandBars);
CommandBar projectFileListMenu = cmdBars["Item"];

Any idea?

Upvotes: 0

Views: 383

Answers (1)

Piyush Soni
Piyush Soni

Reputation: 1406

You need to get the "Easy MDI Document Window" window using the same method you've written.

CommandBar tabCommandBar = cmdBars["Easy MDI Document Window"];

Then add your control to this command bar.

Upvotes: 1

Related Questions