Share via


Buttons Element

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Groups Button elements, which represent individual commands.

Syntax

<Buttons>  
  <Button>... </Button>  
  <Button>... </Button>  
</Buttons>  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
Condition Optional. See Conditional Attributes.

Child Elements

Element Description
Buttons Element Groups Button elements.
Button Element Defines a command that the user can interact with.

Parent Elements

Element Description
Commands Element Represents the collection of commands on the VSPackage toolbar.

Example

<Buttons>  
  <Button guid="guidMenuAndCommandsCmdSet" id="cmdidMyCommand"     priority="0x100" type="Button">  
    <Parent guid="guidMenuAndCommandsCmdSet" id="MyMenuGroup"/>  
    <Icon guid="guidGenericCmdBmp" id="bmpArrow"/>  
    <Strings>  
      <ButtonText>C# Command Sample</ButtonText>  
    </Strings>  
  </Button>  
</Buttons>  

See Also

How VSPackages Add User Interface Elements
Commands, Menus, and Toolbars