This documentation is archived and is not being maintained.

_DTE.CommandBars Property

Gets a reference to the development environment's CommandBars object.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

CommandBars CommandBars { get; }

Property Value

Type: CommandBars
A Microsoft.VisualStudio.CommandBars object.

The CommandBars object is a part of the Microsoft.VisualStudio.CommandBars namespace. Documentation for this namespace is available on the MSDN website at http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.commandbars.aspx.

Sub CommandBarsExample()
  MsgBox(DTE.CommandBars.Count)
End Sub

Show: