分享方式:


<Controls> (RibbonDiffXml)

適用於: CRM 2015 on-prem, CRM Online

包含控制項的集合。

重要

The valid child elements of the Controls element depend on the parent element.

語法

<CommandUIDefinition>
 <Controls
  Id="String"
  ToolTipDescription="String"
  ToolTipHelpKeyWord="String"
  ToolTipImage32by32="String"
  ToolTipImage32by32Class="String"
  ToolTipImage32by32Left="NonPositiveInteger"
  ToolTipImage32by32Top="NonPositiveInteger"
  ToolTipTitle="String">
  [ 
    <Button /> |
    <CheckBox /> |
    <ComboBox /> |
    <ColorPicker /> |
    <ContextualGroup /> |
    <Controls /> |
    <DropDown /> |
    <FlyoutAnchor /> |
    <Gallery /> |
    <GalleryButton /> |
    <GroupTemplate /> |
    <Group /> |
    <Groups /> |
    <InsertTable /> |
    <Label /> |
    <MRUSplitButton /> |
    <MaxSize /> |
    <Menu /> |
    <MenuSection /> |
    <Scale /> |
    <Scaling /> |
    <Spinner /> |
    <SplitButton /> |
    <Tab /> |
    <TextBox/> |
    <ToggleButton />
   ]
 </Controls>
</CommandUIDefinition>

<MenuSection>
 <Controls
  Id="String"
  ToolTipDescription="String"
  ToolTipHelpKeyWord="String"
  ToolTipImage32by32="String"
  ToolTipImage32by32Class="String"
  ToolTipImage32by32Left="NonPositiveInteger"
  ToolTipImage32by32Top="NonPositiveInteger"
  ToolTipTitle="String">
  [ 
    <ToggleButton /> |
    <Button /> |
    <ColorPicker /> |
    <FlyoutAnchor /> |
    <InsertTable /> 
   ]
 </Controls>
</MenuSection>

屬性和元素

The following table lists the attributes, child elements, and parent elements.

屬性

Attribute Description Type Usage

Id

為功能區元素定義指定唯一識別碼。強烈建議的命名慣例是使用句號分隔名稱的各個部分,如下:[solution identifier].[entity].[ribbon].[function]...[element name]。例如:MyISV.account.form.SendToOtherSystem.Button。

Use the {!EntityLogicalName} token in the Id attribute when you define a ribbon element that will be used for multiple entities. This inserts the entity logical name into the Id value to make sure that the Id value is globally unique.

For example, if you use MyISV.{!EntityLogicalName}.form.SendToOtherSystem.Button with the account entity, the Id will be MyISV.account.form.SendToOtherSystem.Button. For the contact entity, the Id will be MyISV.contact.form.SendToOtherSystem.Button.

重要

If you don’t set a globally unique Id value, the ribbon might not display.

[IMPORTANT]

String

Required

ToolTipDescription

為控制項的工具提示指定顯示字串。這可以透過 $LocLabels: 指示詞來參照 LocLabel 元素,例如 "$LocLabels:MyISV.account.Save.Button.Tooltip"。

String

Optional

ToolTipHelpKeyWord

此元素未使用於 Microsoft Dynamics CRM。

String

Optional

ToolTipImage32by32

指定工具提示中顯示的 32x32 像素影像。

String

Optional

ToolTipImage32by32Class

指定 CSS 類別,以套用至工具提示中顯示的 32x32 像素影像。

String

Optional

ToolTipImage32by32Left

指定要將工具提示 32x32 像素影像向左移的像素數目。這是由負數代表。

Non Positive Integer

Optional

ToolTipImage32by32Top

指定要將工具提示 32x32 像素影像移至頂端的像素數目。這是由負數代表。

Non Positive Integer

Optional

ToolTipSelectedItemTitle

此元素未使用於 Microsoft Dynamics CRM。

String

Optional

ToolTipShortcutKey

此元素未使用於 Microsoft Dynamics CRM。

String

Optional

ToolTipTitle

為控制項的工具提示標題指定顯示字串。這通常與 LabelText 控制項的值相同。這可以透過 $LocLabels: 指示詞來參照 LocLabel 元素,例如 "$LocLabels:MyISV.account.Save.Button.Label"。

String

Optional

子元素

Element Description

<Button> (RibbonDiffXml)

指定用於執行動作的簡單按鈕。

<CheckBox> (RibbonDiffXml)

指定用於選取選項的核取方塊。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<ColorPicker> (RibbonDiffXml)

已被取代:指定用於選取色彩或樣式的方格。

This element is only valid when Controls is a child of <MenuSection> (RibbonDiffXml)

<ComboBox> (RibbonDiffXml)

已被取代:指定清單,藉由按一下或輸入來選取值。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<DropDown> (RibbonDiffXml)

已被取代:指定清單,藉由按一下來選取值。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<FlyoutAnchor> (RibbonDiffXml)

指定具有向下鍵的按鈕,用於開啟功能表。

<GalleryButton> (RibbonDiffXml)

已被取代:指定圖庫元素內的按鈕控制項。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<InsertTable> (RibbonDiffXml)

已被取代:指定 10x10 方格,用於指定資料表的維度。

This element is only valid when Controls is a child of <MenuSection> (RibbonDiffXml)

<Label> (RibbonDiffXml)

指定用於提供資訊的一行文字。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<MRUSplitButton> (RibbonDiffXml)

已被取代:指定分割按鈕控制項,用於顯示最近使用的項目。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<Spinner> (RibbonDiffXml)

指定控制項,藉由輸入或使用方向鍵循環選擇值來插入值。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<SplitButton> (RibbonDiffXml)

指定同時做為按鈕和功能表使用的控制項。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<TextBox> (RibbonDiffXml)

已被取代:指定用於輸入文字的控制項。

This element is only valid when Controls is a child of <CommandUIDefinition> (RibbonDiffXml).

<ToggleButton> (RibbonDiffXml)

指定用於切換開啟和關閉狀態的按鈕。

上層元素

Element Description

<Group> (RibbonDiffXml)

在索引標籤內指定共用通用配置範本的控制項群組。

<CommandUIDefinition> (RibbonDiffXml)

指定要包含在 CustomAction 元素中的可見 Ribbon 元素。

<MenuSection> (RibbonDiffXml)

指定用於劃分功能表的區段。功能表區段可以有標題並包含控制項。

元素資訊

XPath

//RibbonDiffXml/CustomActions/CustomAction/CommandUIDefinition/Controls |
//RibbonDiffXml/CustomActions/CustomAction/CommandUIDefinition/Menu/MenuSection/Controls |
//RibbonDiffXml/CustomActions/CustomAction/CommandUIDefinition/MenuSection/Controls

Schema Name

ControlsType

Validation File

RibbonWSS.xsd

Can be Empty

Yes

請參閱

其他資源

自訂命令和功能區
Ribbon XML reference

Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.