In Visual Studio 2010, the only option you can create is a commandbar under "Tools" on the "MenuBar". In some cases, I would want to know how to place the command bar on the standard bar, or be found when I right-click a project file.
Example:
Microsoft.VisualStudio.CommandBars.CommandBar menuBarCommandBar =
((Microsoft.VisualStudio.CommandBars.CommandBars)_applicationObject.
CommandBars)["MenuBar"];
By default it shows "MenuBar" and I am certain there is others, such as "Standard". However I am unable to find the resources or documentation for the list, and I wonder if anyone know where to look for list of these "Names".
Thank you guys in advance.
I needed to figure this out while working on a visual studio plug-in. It looks like it depends on what you have installed. For example, I have some clear case CommandBars available to me because I work with the clear case integration plug-in. I'll echo that the more common ones are "Code Window", "Project", "MenuBar", "Solution", and "Item". To specifically answer your question, you would use the "Standard" and "Project" command bars.
To generate a list of all CommandBars you can create a visual studio plug-in and paste the following code into OnStartupComplete in Connect.cs:
Results (over 300):
To find the name of a special command bar, this helps me very well. Just implement into the OnConnection():
With every right click you will get the name.
I only know of a few, and I am too wondering this, since I would like to know the name of the html code window in asp.net.
but here are the ones I know: "Code Window" (right-click code menu) "Tools" "MenuBar" "Standard"
EDIT: Also you can put a for loop to look through the commandbar names. (enumeration)
I think you can get all commandbars by enumerate : CommandBars.GetEnumerator