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


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

Namespace:   EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

object AddCommandBar(
	string Name,
	vsCommandBarType Type,
	object CommandBarParent,
	int Position = 1


Type: System.String

Required. A name for the new command bar.

Type: EnvDTE.vsCommandBarType

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

Type: System.Object

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

Type: System.Int32

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

Return Value

Type: System.Object

A CommandBar object.

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

Return to top