CommandBarControls::Add Method (Object^, Object^, Object^, Object^, Object^)

 

Adds a command bar control with the given characteristics.

Namespace:   Microsoft.VisualStudio.CommandBars
Assembly:  Microsoft.VisualStudio.CommandBars (in Microsoft.VisualStudio.CommandBars.dll)

[DispIdAttribute(1610809344)]
CommandBarControl^ Add(
	Object^ Type,
	Object^ Id,
	Object^ Parameter,
	Object^ Before,
	Object^ Temporary
)

Parameters

Type
Type: System::Object^

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

Id
Type: System::Object^

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

Parameter
Type: System::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
Type: System::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
Type: System::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.

Return Value

Type: Microsoft.VisualStudio.CommandBars::CommandBarControl^

The T:Microsoft.VisualStudio.CommandBars.CommandBarControl.

Return to top
Show: