Visual Studio add-in : How to add a command to visual studio's tab context menu?
I've built a Visual St开发者_StackOverflow社区udio 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?
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.
精彩评论