共用方式為


Gallery Element

Applies to: SharePoint Foundation 2010

Defines a gallery.

<Gallery
  Command="Text"
  CommandPreview="Text"
  CommandRevert="Text"
  ElementDimensions="Size16by16 | Size32by32 | Size48by48 | Size72by96 | Size96by72 | Size96by96 | Size128by128 | Size190by30 | Size190by40 | Size190by50 | Size190by60"
  Id="Text"
  QueryCommand="Text"
  Sequence="Integer"
  Width="Integer"
/>

Attributes

Attribute

Description

Command

Optional. The name of the command to execute when the control is clicked. 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.

ElementDimensions

Required. An enumeration value that specifies the dimensions of rectangular child elements. 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 "GadgetsGallery".

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.

Width

Required. The width of the gallery in pixels.

Child Elements

GalleryButton

Parent Elements

CommandUIDefinition

MenuSection

Occurrences

Minimum: 1

Maximum: 1

Remarks

A gallery is a graphically rich list box. The items in a gallery are usually mutually exclusive choices, and the result of a choice is visually previewed either by an image or by a rendered HTML fragment.