Export (0) Print
Expand All

InRibbonGallery element

Represents the In-Ribbon Gallery, a gallery-based control that exposes a default subset of items directly in the Ribbon. Any remaining items are displayed when a drop-down menu button is clicked.

Usage

<InRibbonGallery
  CommandName = "xs:positiveInteger or xs:string"
  HasLargeItems = "Boolean"
  ItemHeight = "xs:integer"
  ItemWidth = "xs:integer"
  MinColumnsLarge = "xs:integer"
  MaxColumnsMedium = "xs:integer"
  MinColumnsMedium = "xs:integer"
  MaxColumns = "xs:integer"
  MaxRows = "xs:integer"
  TextPosition = "TextPositionType"
  Type = "xs:string">
  child elements
</InRibbonGallery>

Attributes

AttributeTypeRequiredDescription

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.

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 Command.

Restricted to one of the following values (0 and 1 are not valid):

(true)

Default.

(false)

ItemHeight

xs:integer

No

Together with ItemWidth, determines the size of the item image that is displayed in the gallery control.

Note  Applies only to galleries where the value of the Type attribute is equal to Item.

(xs:integer)

The default is -1.

ItemWidth

xs:integer

No

Together with ItemHeight, determines the size of the item image that is displayed in the gallery control.

Note  Applies only to galleries where the value of the Type attribute is equal to Item.

(xs:integer)

The default is -1.

MaxColumns

xs:integer

No

Specifies the maximum number of columns that the InRibbonGallery displays, for example, in the Large group layout drop-down.

(xs:integer)

MaxColumnsMedium

xs:integer

No

Specifies the maximum number of columns that the InRibbonGallery displays in the Medium group layout, before switching to Large layout.

(xs:integer)

MaxRows

xs:integer

No

Specifies the maximum number of rows for the layout of InRibbonGallery items.

(xs:integer)

The default is 1.

MinColumnsLarge

xs:integer

No

Specifies the minimum number of columns that the InRibbonGallery displays in the Large group layout, before switching to Medium.

(xs:integer)

MinColumnsMedium

xs:integer

No

Specifies the minimum number of columns that the InRibbonGallery displays in the Medium group layout, before switching to Small.

(xs:integer)

TextPosition

TextPositionType

No

Specifies where the item label is displayed, relative to the image.

Restricted to one of the following values:

(Bottom)

(Hide)

(Left)

(Overlap)

(Right)

(Top)

Type

xs:string

No

Restricted to one of the following values:

(Items)

(Commands)

Child elements

ElementDescription

CheckBox

May occur one or more times

InRibbonGallery.MenuGroups

Must occur exactly once

InRibbonGallery.MenuLayout

May occur at most once

Spinner

May occur one or more times

SplitButton

May occur one or more times

ToggleButton

May occur one or more times

Parent elements

ElementDescription

ControlGroup

Group

QuickAccessToolbar.ApplicationDefaults

Note  Windows 8 and newer.

Remarks

Optional.

May occur at most once for each ControlGroup or Group element.

The following screen shot illustrates the Ribbon In-Ribbon Gallery control in Microsoft Paint for Windows 7.

Screen shot of an In-Ribbon Gallery control in the Microsoft Paint Ribbon.

Examples

The following example demonstrates the basic markup for an In-Ribbon Gallery.

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


<!-- InRibbonGallery -->
<Command Name="cmdInRibbonGalleryGroup"
         Symbol="cmdInRibbonGalleryGroup"
         Comment="InRibbonGallery Group"
         LabelTitle="InRibbonGallery"/>
<Command Name="cmdInRibbonGallery"
         Symbol="cmdInRibbonGallery"
         Comment="InRibbonGallery"
         LabelTitle="InRibbonGallery"/>


This section of code shows the InRibbonGallery control declarations.


<!-- InRibbonGallery -->
<Group CommandName="cmdInRibbonGalleryGroup" SizeDefinition="OneInRibbonGallery">
  <InRibbonGallery CommandName="cmdInRibbonGallery"
                   MaxColumns="10"
                   MaxColumnsMedium="5"
                   MinColumnsLarge="5"
                   MinColumnsMedium="3"
                   Type="Items">
    <InRibbonGallery.MenuLayout>
      <VerticalMenuLayout Rows="2"
                          Gripper="Vertical"/>
    </InRibbonGallery.MenuLayout>
    <InRibbonGallery.MenuGroups>
      <MenuGroup>
        <Button CommandName="cmdButton1"></Button>
        <Button CommandName="cmdButton2"></Button>
      </MenuGroup>
      <MenuGroup>
        <Button CommandName="cmdButton3"></Button>
      </MenuGroup>
    </InRibbonGallery.MenuGroups>            
  </InRibbonGallery>
</Group>


Element information

Minimum supported system

Windows 7
Can be emptyNo

See also

In-Ribbon Gallery control
Working with Galleries
Gallery Sample

 

 

Community Additions

ADD
Show:
© 2014 Microsoft