Commands2.AddCommandBar(String, vsCommandBarType, Object, Int32) Method

Definition

Creates a command bar that is saved and available the next time the environment is started.

winrt::Windows::Foundation::IInspectable AddCommandBar(std::wstring const & Name, EnvDTE::vsCommandBarType Type, winrt::Windows::Foundation::IInspectable const & CommandBarParent, int Position = 1);

Parameters

Name
String

Required. A name for the new command bar.

Type
vsCommandBarType

Required. A vsCommandBarType constant that determines the type of command bar:

CommandBarParent
Object

Optional. A CommandBar object to which the new command bar is to be added. (This is required, however, if Type is vsCommandBarTypeMenu.)

Position
Int32

Optional. The index position, starting at one, in the command bar to place the new command bar.

Returns

A CommandBar object.

Implements

Attributes

Remarks

The new command bar is available during each new session of the environment.

Applies to

Product Versions
Visual Studio SDK 2015, 2017, 2019, 2022