GalleryButton element (Gallery) (Server Ribbon)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Defines a gallery button.

<GalleryButton
  Alt="Text"
  Command="Text"
  CommandPreview="Text"
  CommandRevert="Text"
  CommandType="General | OptionSelect | IgnoredByMenu"
  CommandValueId="Text"
  ElementDimensions="Size16by16 | Size32by32 | Size48by48 | Size72by96 | Size96by72 | Size96by96 | Size128by128 | Size190by30 | Size190by40 | Size190by50 | Size190by60"
  Id="Text"
  Image="Url"
  ImageClass="CSS Selector"
  ImageLeft="Negative Integer"
  ImageTop="Negative Integer"
  InnerHTML="HTML"
  MenuItemId="Text"
  QueryCommand="Text"
  Sequence="Text"
  TemplateAlias="Text"
  ToolTipImage32by32="Url"
  ToolTipImage32by32Class="CSS Class Selector"
  ToolTipImage32by32Left="Negative Integer"
  ToolTipImage32by32Top="Negative Integer"
  ToolTipTitle="Text"
  ToolTipDescription="Text"
  ToolTipHelpKeyWord="Text"
  ToolTipShortcutKey="Text"
/>

Elements and attributes

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

Attributes

Attribute Description
Alt
Optional. Alternative text that is used for the control.
Command
Optional. The name of the command to execute when the control is selected. If the control is in a CommandUIDefinition element, the value of the Command attribute of the control should be the same as the value of the Command attribute of a corresponding CommandUIHandler element.
CommandPreview
Optional. The name of the command to execute for previewing a selection.
CommandRevert
Optional. The name of the command to execute to return to the state that existed before previewing a selection.
CommandType
Optional. An enumeration value that specifies the type of command.
General. Not a specific type of command.
OptionSelection. A command that is generated when a user selects one option in an option group.
IgnoredByMenu. A command that is used for controls that should not close the menu when they are selected.
CommandValueId
Optional. A string that is sent with the command event when the button is selected.
ElementDimensions
Required. An enumeration value that specifies the dimensions of the rectangle in which the button is rendered. Dimensions are in pixels and are in the format "width by height".
Size16by16
Size32by32
Size48by48
Size72by96
Size96by72
Size96by96
Size128by128
Size190by30
Size190by40
Size190by50
Size190by60
Id
Required. A string that identifies the element, such as "buttonStaticStyle1".
Image
Optional. A server-relative URL to a file that contains an image to be used as an icon.
If an Image attribute is not defined, an InnerHTML attribute must be defined.
ImageClass
Optional. The name of a CSS class selector to be applied to the image.
ImageLeft
Optional. A negative integer that represents an offset for the left edge of the image. Use this attribute when the Image attribute points to an image file that contains images for several icons.
ImageTop
Optional. A negative integer that represents an offset for the top edge of the image. Use this attribute when the Image attribute points to an image file that contains images for several icons.
InnerHTML
Optional. HTML markup that illustrates the choice that the button represents.
If the InnerHTML attribute is not defined, the Image attribute must be defined.
MenuItemId
Optional. A string that identifies the menu item where the button is located.
QueryCommand
Optional. The name of the command to execute when polling for state information.
Sequence
Optional. An integer that specifies the order of placement among sibling XML nodes.
TemplateAlias
Optional. A string that matches the value of the TemplateAlias attribute for a ControlRef element, an OverflowArea element, or an OverflowSection element in a GroupTemplate element. The TemplateAlias attribute is used to size and position controls within a group when a template is applied to the group.
ToolTipImage32by32
Optional. A server-relative URL to a file that contains a 32-by-32-pixel image to be used in the tooltip, such as "/_layouts/1033/images/formatmap32x32.png".
ToolTipImage32by32Class
Optional. The name of a CSS class selector to be applied to the tooltip image.
ToolTipImage32by32Left
Optional. A negative integer that represents an offset for the left edge of the image. Use this attribute when the ToolTipImage32by32 attribute points to an image file that contains the images for many icons. The value of the ToolTipImage32by32Left attribute is used to set the CSS left attribute for the inline style of an HTML img tag when the page is created.
ToolTipImage32by32Top
Optional. A negative integer that represents an offset for the top edge of the image. Use this attribute when the ToolTipImage32by32 attribute points to an image file that contains the images for many icons. The value of the ToolTipImage32by32Top attribute is used to set the CSS top attribute for the inline style of an HTML img tag when the page is created.
ToolTipTitle
Optional. The text that appears as the title of the tooltip.
ToolTipDescription
Optional. The text that appears in the body of the tooltip.
ToolTipHelpKeyWord
Optional. The keyword that is used by context-sensitive Help.
ToolTipShortcutKey
Optional. The text to display for the shortcut key in the tooltip. For example, if the shortcut key for the control is Alt+J, the value for this attribute is "Alt+J". The tooltip will display the text for the shortcut key in parentheses after the tooltip title: "(Alt+J)".

Child elements

None

Parent elements

Occurrences

  • Minimum: 1
  • Maximum: unbounded