ComboBox element

Represents a Combo Box control.

Usage

<ComboBox
  CommandName = "xs:positiveInteger or xs:string"
  IsEditable = "Boolean"
  ResizeType = "ComboBoxResizeType"
  IsAutoCompleteEnabled = "Boolean"/>

Attributes

Attribute Type Required Description
CommandName
xs:positiveInteger or xs:string
No
Associates the element with a Command.

(xs:positiveInteger or xs:string)
A string, an integer value between 2 and 59999, inclusive, or a hexadecimal value between 0x2 and 0xea5f, inclusive.
The value must be unique within the Ribbon XML document.
Maximum length: 100 characters.
IsAutoCompleteEnabled
Boolean
No
Restricted to one of the following values (0 and 1 are not valid):

(true)
Default.
(false)
IsEditable
Boolean
No
Restricted to one of the following values (0 and 1 are not valid):

(true)
Default.
(false)
ResizeType
ComboBoxResizeType
No
(NoResize)
Default.
(VerticalResize)

Child elements

There are no child elements.

Parent elements

Element Description
ControlGroup
DropDownButton
DropDownGallery
Group
MenuGroup
QuickAccessToolbar.ApplicationDefaults
Note:
Windows 8 and newer.



SplitButtonGallery

Remarks

Optional.

May occur one or more times for each ControlGroup, DropDownButton, DropDownGallery, Group, MenuGroup, or SplitButtonGallery element.

Because the ComboBox is exclusively an item gallery, it does not support Command items. It is also the only gallery control that does not support a Command Space (a collection of Commands that are declared in markup and listed at the bottom of an item gallery or Command gallery). For more information, see Working with Galleries.

The following screen shot illustrates a Ribbon Combo Box control from Windows Live Movie Maker.

screen shot of a combobox control in the microsoft paint ribbon.

Examples

The following examples demonstrate the basic markup for the ComboBox.

This section of code shows the ComboBox Command declarations, with an associated Group that acts as the parent container for the ComboBox element.

<!-- ComboBox -->
<Command Name="cmdComboBoxGroup"
         Symbol="cmdComboBoxGroup"
         Comment="ComboBox Group"
         LabelTitle="ComboBox"/>
<Command Name="cmdComboBox"
         Symbol="cmdComboBox"
         Comment="ComboBox"
         LabelTitle="ComboBox"/>

This section of code shows the ComboBox control declarations.

<!-- ComboBox -->
<Group CommandName="cmdComboBoxGroup">
  <ComboBox CommandName="cmdComboBox">              
  </ComboBox>
</Group>

Element information

  • Minimum supported system: Windows 7
  • Can be empty: Yes

See also

Combo Box control

Gallery Sample