Commands2.AddCommandBar(String, vsCommandBarType, Object, Int32) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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.
A CommandBar object.
- Attributes
The new command bar is available during each new session of the environment.
Product | Versions |
---|---|
Visual Studio SDK | 2015, 2017, 2019, 2022 |