DropDownButton 元素

表示標準 下拉式按鈕 控制項。

使用方式

<DropDownButton
  ApplicationModes = "xs:string"
  CommandName = "xs:positiveInteger or xs:string">
  child elements
</DropDownButton>

屬性

屬性 類型 必要 描述
ApplicationModes
xs:string

只有在 MenuGroup 是父元素時才有效。

(xs:string)
字串,包含介於 0 到 31 之間的逗號分隔整數清單。
空白字元有效且忽略。
最大長度:250 個字元。
CommandName
xs:positiveInteger 或 xs:string

將專案與 Command產生關聯。

(xs:positiveInteger 或 xs:string)
字串、介於 2 到 59999 之間的整數值,包含,或包含0x2與0xea5f之間的十六進位值。
值在功能區 XML 檔中必須是唯一的。
最大長度:100 個字元。

子元素

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

CheckBox
可能會發生一或多次

ComboBox
可能會發生一或多次

DropDownButton
可能會發生一或多次

DropDownColorPicker
可能會發生一或多次

DropDownGallery
可能會發生一或多次

MenuGroup
必須至少發生一次

SplitButton
可能會發生一或多次

SplitButtonGallery
可能會發生一或多次

ToggleButton
可能會發生一或多次

父元素

元素
ControlGroup
DropDownButton
DropDownGallery
群組
MenuGroup
SplitButton
SplitButtonGallery

備註

視父元素而定,選擇性或必要。

每個ControlGroupDropDownButtonDropDownGalleryGroupMenuGroupSplitButton 或 SplitButtonGallery元素可能會發生一或多次。

DropDownButton 支援 應用程式模式 裝載于應用程式功能表左側資料行時。

DropDownButtonApplicationMenu的子系時,DropDownGallerySplitButtonGallery不是DropDownButton的有效子項目。

範例

下列範例示範 DropDownButton的基本標記。

這一節程式碼會顯示 DropDownButton 命令宣告,其相關聯的 Group 會作為 DropDownButton 元素的父容器。

<!-- DropDownButton -->
<Command Name="cmdDropDownButtonGroup"
         Symbol="cmdDropDownButtonGroup"
         Comment="DropDownButton Group"
         LabelTitle="DropDownButton"/>
<Command Name="cmdDropDownButton"
         Symbol="cmdDropDownButton"
         Comment="DropDownButton"
         LabelTitle="DropDownButton"/>
<Command Name="cmdDDBButton1"
         Symbol="cmdDDBButton1"
         Comment="DDBButton1"
         LabelTitle="DDB Button"/>
<Command Name="cmdDDBColorPicker"
         Symbol="cmdDDBColorPicker"
         Comment="DDBColorPicker"
         LabelTitle="DDB ColorPicker"/>

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

<Group CommandName="cmdDropDownButtonGroup">
  <DropDownButton CommandName="cmdDropDownButton">
    <MenuGroup>
      <Button CommandName="cmdDDBButton1"/>
      <DropDownColorPicker CommandName="cmdDDBColorPicker"/>
    </MenuGroup>
  </DropDownButton>
</Group>

項目資訊

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

另請參閱

下拉式按鈕控制項

SetModes