Applies to: desktop apps only
Represents a Drop-Down Gallery control with a gallery-based menu.
Usage
<DropDownGallery ApplicationModes = "xs:string" CommandName = "xs:positiveInteger or xs:string" HasLargeItems = "Boolean" ItemHeight = "xs:integer" ItemWidth = "xs:integer" TextPosition = "TextPositionType" Type = "xs:string"> child elements </DropDownGallery>
Attributes
| Attribute | Type | Required | Description |
|---|---|---|---|
|
ApplicationModes |
xs:string |
No |
Valid only if MenuGroup is the parent element. |
|
CommandName |
xs:positiveInteger or xs:string |
No |
Associates the element with a Command. |
|
HasLargeItems |
Boolean |
No |
Determines whether the large or small image resource of the Command is displayed in the gallery control. Note Applies only to galleries where the value of the Type
attribute is equal to Restricted to one of the following values (0 and 1 are not valid): |
|
ItemHeight |
xs:integer |
No | |
|
ItemWidth |
xs:integer |
No | |
|
TextPosition |
TextPositionType |
No |
Restricted to one of the following values: |
|
Type |
xs:string |
No |
Restricted to one of the following values: |
Child elements
| Element | Description |
|---|---|
|
May occur one or more times | |
|
May occur one or more times | |
|
Must occur exactly once | |
|
May occur at most once | |
|
May occur one or more times | |
|
May occur one or more times |
Parent elements
| Element |
|---|
Remarks
Optional.
May occur one or more times for each ControlGroup, DropDownButton, Group, MenuGroup, or SplitButton element.
DropDownGallery supports application modes.
If MenuGroup is the parent element, then DropDownGallery must have no child elements.
The following screen shot illustrates the Ribbon Drop-Down Gallery control in Microsoft Paint for Windows 7.

Examples
The following example demonstrates the basic markup for the DropDownGallery.
This section of code shows the DropDownGallery Command declarations, with an associated Group that acts as the parent container for the DropDownGallery element.
<!-- DropDownGallery -->
<Command Name="cmdDropDownGalleryGroup"
Symbol="cmdDropDownGalleryGroup"
Comment="DropDownGallery Group"
LabelTitle="DropDownGallery"/>
<Command Name="cmdDropDownGallery"
Symbol="cmdDropDownGallery"
Comment="DropDownGallery"
LabelTitle="DropDownGallery"/>
This section of code shows the DropDownGallery control declarations.
<!-- DropDownGallery -->
<Group CommandName="cmdDropDownGalleryGroup">
<DropDownGallery CommandName="cmdDropDownGallery"
TextPosition="Hide"
Type="Commands"
ItemHeight="32"
ItemWidth="32">
<DropDownGallery.MenuLayout>
<FlowMenuLayout Rows="2"
Columns="3"
Gripper="None"/>
</DropDownGallery.MenuLayout>
<DropDownGallery.MenuGroups>
<MenuGroup>
<Button CommandName="cmdButton1"></Button>
<Button CommandName="cmdButton2"></Button>
</MenuGroup>
<MenuGroup>
<Button CommandName="cmdButton3"></Button>
</MenuGroup>
</DropDownGallery.MenuGroups>
</DropDownGallery>
</Group>
Element information
|
Minimum supported system | Windows 7 |
|---|---|
| Can be empty | No |
See also
Send comments about this topic to Microsoft
Build date: 2/15/2012