Share via


InRibbonGallery 元素

表示 功能區內資源庫,這是直接在功能區中公開預設專案子集的圖庫型控制項。 按一下下拉式功能表按鈕時,會顯示任何剩餘的專案。

使用方式

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

屬性

屬性 類型 必要 描述
CommandName
xs:positiveInteger 或 xs:string

將專案與 Command產生關聯。

(xs:positiveInteger 或 xs:string)
字串、介於 2 到 59999 之間的整數值、包含或0x2與0xea5f之間的十六進位值,包含。
值在功能區 XML 檔中必須是唯一的。
最大長度:100 個字元。
HasLargeItems
Boolean
No
判斷命令的大型或小型影像資源是否顯示在資源庫控制項中。

注意:
僅適用于 類型 屬性的值等於 Command 的資源庫。


限制為下列其中一個值, (0 和 1 無效) :

(true)
預設值。
(false)
ItemHeight
xs:integer

ItemWidth一起決定資源庫控制項中顯示的專案影像大小。

注意:
僅適用于 類型 屬性的值等於 Item 的資源庫。



(xs:integer)
預設值為 -1。
ItemWidth
xs:integer

ItemHeight一起決定資源庫控制項中顯示的專案影像大小。

注意:
僅適用于 類型 屬性的值等於 Item 的資源庫。



(xs:integer)
預設值為 -1。
MaxColumns
xs:integer

指定 InRibbonGallery[大型 群組配置] 下拉式清單中顯示的資料行數目上限。

(xs:integer)
MaxColumnsMedium
xs:integer

指定InRibbonGallery在切換至大型版面配置之前,在 [] 群組配置中顯示的資料行數目上限。

(xs:integer)
MaxRows
xs:integer

指定 InRibbonGallery 專案版面配置的最大資料列數目。

(xs:integer)
預設值是 1。
MinColumnsLarge
xs:integer

指定InRibbonGallery在切換至[中] 之前,在 [大型群組配置] 中顯示的資料行數目下限。

(xs:integer)
MinColumnsMedium
xs:integer

指定 InRibbonGallery 在切換至 Small 之前,在 [ ] 群組配置中顯示的資料行數目 限。

(xs:integer)
TextPosition
TextPositionType

指定相對於影像顯示專案標籤的位置。
限制為下列其中一個值:

(底部)
(隱藏)
左 ()
(重迭)
(右)
(Top)
類型
xs:string

限制為下列其中一個值:

(專案)
(命令)

子元素

元素 描述
CheckBox
可能發生一或多次

InRibbonGallery.MenuGroups
必須剛好發生一次

InRibbonGallery.MenuLayout
最多可能發生一次

按鈕
可能發生一或多次

SplitButton
可能發生一或多次

ToggleButton
可能發生一或多次

父元素

元素 描述
ControlGroup

QuickAccessToolbar.ApplicationDefaults
注意:
Windows 8 和更新版本。



備註

選擇性。

每個 ControlGroupGroup 元素最多可能會發生一次。

下列螢幕擷取畫面說明 Windows 7 Microsoft 小畫家功能內資源庫控制項。

microsoft paint 功能區中功能區內資源庫控制項的螢幕擷取畫面。

範例

下列範例示範功能 區內資源庫的基本標記。

這一節的程式碼會顯示 InRibbonGallery 命令宣告,其中包含一個相關聯的 Group ,做為 InRibbonGallery 元素的父容器。

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

此程式碼區段會顯示 InRibbonGallery 控制項宣告。

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

項目資訊

  • 最低支援系統:Windows 7
  • 可以是空的:否

另請參閱

功能區內資源庫控制項

使用資源庫

資源庫範例