Partilhar via


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);
[System.Runtime.InteropServices.DispId(12)]
public object AddCommandBar (string Name, EnvDTE.vsCommandBarType Type, object CommandBarParent, int Position = 1);
[<System.Runtime.InteropServices.DispId(12)>]
abstract member AddCommandBar : string * EnvDTE.vsCommandBarType * obj * int -> obj
Public Function AddCommandBar (Name As String, Type As vsCommandBarType, Optional CommandBarParent As Object, Optional Position As Integer = 1) As Object

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