DropDownGallery 要素

ギャラリー ベースのメニューを含む ドロップダウン ギャラリー コントロールを表します。

使用法

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

属性

属性 Type 必須 説明
ApplicationModes
xs:string
いいえ
MenuGroup が親要素の場合にのみ有効です。

(xs:string)
0 ~ 31 の整数のコンマ区切りのリストを含む文字列。
空白は有効であり、無視されます。
最大長: 250 文字。
CommandName
xs:positiveInteger または xs:string
いいえ
要素を Command に関連付 けます

(xs:positiveInteger または xs:string)
文字列、2 ~ 59999 の整数値、または 0x2 から 0xea5f までの 16 進数の値 (両端を含む)。
値は、リボン XML ドキュメント内で一意である必要があります。
最大長: 100 文字。
HasLargeItems
ブール型
いいえ
Command の大きなイメージ リソースと小さいイメージ リソースのどちらをギャラリー コントロールに表示するかを指定します。

注:
Type 属性の値が と等しいCommandギャラリーにのみ適用されます。


次のいずれかの値に制限されます (0 と 1 は無効です)。

(true)
既定値。
(false)
ItemHeight
xs:integer
いいえ
(xs:integer)
既定値は -1 です。
ItemWidth
xs:integer
いいえ
(xs:integer)
既定値は -1 です。
TextPosition
TextPositionType
いいえ
次のいずれかの値に制限されます。

(下)
(非表示)
(左)
(重なり)
(右)
(上)
Type
xs:string
いいえ
次のいずれかの値に制限されます。

(項目)
(コマンド)

子要素

要素 説明
Button
1 回以上発生する可能性がある

Checkbox
1 回以上発生する可能性がある

DropDownGallery.MenuGroups
1 回だけ発生する必要があります

DropDownGallery.MenuLayout
最大で 1 回発生する可能性があります

SplitButton
1 回以上発生する可能性がある

ToggleButton
1 回以上発生する可能性がある

親要素

要素 説明
ControlGroup
グループ
MenuGroup
ApplicationMenu に含まれている場合。 この要素は、最初のレベルでのみサポートされており、子要素を持つ必要はありません。

QuickAccessToolbar.ApplicationDefaults
注:
Windows 8 以降。



SplitButton

解説

任意。

ControlGroupDropDownButtonGroupMenuGroup、または SplitButton 要素ごとに 1 回以上発生する可能性があります。

DropDownGallery ではアプリケーション モードがサポートされています。

次のスクリーン ショットは、Windows 7 のMicrosoft ペイントのリボン ドロップダウン ギャラリー コントロールを示しています。

Windows 7 用 Microsoft ペイントのドロップダウン ギャラリー コントロールのスクリーン ショット。

次の例では、 DropDownGallery の基本的なマークアップを示します。

このコード セクションでは、DropDownGallery コマンド宣言と、DropDownGallery 要素の親コンテナーとして機能する関連付けられた Group を示します。

<!-- DropDownGallery -->
<Command Name="cmdDropDownGalleryGroup"
         Symbol="cmdDropDownGalleryGroup"
         Comment="DropDownGallery Group"
         LabelTitle="DropDownGallery"/>
<Command Name="cmdDropDownGallery"
         Symbol="cmdDropDownGallery"
         Comment="DropDownGallery"
         LabelTitle="DropDownGallery"/>

コードのこのセクションでは、 DropDownGallery コントロールの宣言を示します。

<!-- 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>

要素情報

  • サポートされている最小システム: Windows 7
  • 空にできます: いいえ

関連項目

ドロップダウン ギャラリー コントロール

ギャラリーの操作

SetModes

ギャラリーのサンプル