Share via


CommandBarControls.Add(Object, Object, Object, Object, Object) Method

Definition

Adds a command bar control with the given characteristics.

Microsoft::VisualStudio::CommandBars::CommandBarControl Add(winrt::Windows::Foundation::IInspectable const & Type, winrt::Windows::Foundation::IInspectable const & Id, winrt::Windows::Foundation::IInspectable const & Parameter, winrt::Windows::Foundation::IInspectable const & Before, winrt::Windows::Foundation::IInspectable const & Temporary);
[System.Runtime.InteropServices.DispId(1610809344)]
public Microsoft.VisualStudio.CommandBars.CommandBarControl Add (object Type, object Id, object Parameter, object Before, object Temporary);
public Microsoft.VisualStudio.CommandBars.CommandBarControl Add (object Type, object Id, object Parameter, object Before, object Temporary);
[<System.Runtime.InteropServices.DispId(1610809344)>]
abstract member Add : obj * obj * obj * obj * obj -> Microsoft.VisualStudio.CommandBars.CommandBarControl
abstract member Add : obj * obj * obj * obj * obj -> Microsoft.VisualStudio.CommandBars.CommandBarControl
Public Function Add (Optional Type As Object, Optional Id As Object, Optional Parameter As Object, Optional Before As Object, Optional Temporary As Object) As CommandBarControl

Parameters

Type
Object

[in, optional] The MsoControlType of the new control. If this parameter is not specified, the default value is msoControlButton.

Id
Object

[in, optional] An integer representing the control ID. If this parameter is not specified, the default value is 0.

Parameter
Object

[in, optional] A string representing the parameter of the new control. If this parameter is not specified, the default value is the empty string.

Before
Object

[in, optional] An integer representing the index of the new control. If this parameter is not specified, the new control is added at the end of the collection.

Temporary
Object

[in, optional] A Boolean indicating whether the new control will be present in future sessions of Visual Studio. Controls added with this method never persist beyond the current session, regardless of the setting of this parameter.

Returns

The TCommandBarControl.

Attributes

Applies to