分享方式:


<SplitButton> (RibbonDiffXml)

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

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

語法

<SplitButton
 Alt="String"
 CacheMenuVersions="true"
 Command="String"
 CommandMenuClose="String"
 CommandMenuOpen="String"
 CommandType="General"
 Id="String"
 Image16by16="String"
 Image16by16Class="String"
 Image16by16Left="Non Positive Integer"
 Image16by16Top="Non Positive Integer"
 Image32by32="String"
 Image32by32Class="String"
 Image32by32Left="Non Positive Integer"
 Image32by32Top="Non Positive Integer"
 LabelText="String"
 MenuAlt="String"
 MenuCommand="String"
 ModernImage=”String”
 PopulateDynamically=["0" | "1" | "true" | "false"]
 PopulateOnlyOnce=["0" | "1" | "true" | "false"]
 PopulateQueryCommand="String"
 Sequence="Integer"
 TemplateAlias="String"
 ToolTipDescription="String"
 ToolTipHelpKeyWord="String"
 ToolTipImage32by32="String"
 ToolTipImage32by32Class="String"
 ToolTipImage32by32Left="Non Postive Integer"
 ToolTipImage32by32Top="Non Postive Integer"
 ToolTipSelectedItemTitle="String"
 ToolTipShortcutKey="String"
 ToolTipTitle="String"
 >
 <Menu />
</SplitButton>

屬性和元素

The following describes the attributes, child elements, and parent elements.

屬性

Attribute Description Type Usage

Alt

顯示為替代文字的字串或當地語系化標籤的參照。

String

Optional

CacheMenuVersions

表示是否應該快取控制項定義,以獲得較佳的效能。如果未選取 PopulateDynamically,請選取此值。

String

Optional

Command

指定此控制項的功能區命令識別碼。

String

Optional

CommandMenuClose

指定在功能表關閉時執行的功能表命令識別碼。

String

Optional

CommandMenuOpen

指定在功能表開啟時執行的功能區命令識別碼。

String

Optional

CommandType

允許指定不同類型的命令。

Valid values:

 

Value Description

General

不是特定類型的命令。

OptionSelection

當使用者在選項群組中選取一個選項時產生的命令。

IgnoredByMenu

用於控制項的命令,當按一下功能表時不應該關閉功能表。

Enumeration

Optional

Id

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

Use the {!EntityLogicalName} token in the Id attribute when you are defining a ribbon element that will be used for multiple entities. This will insert 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

> [!IMPORTANT] > Failing to set a globally unique Id value can cause the ribbon not to display.

String

Required

Image16by16

指定 16x16 像素影像。這可以是影像檔的路徑,也可以透過 $webresource: 指示詞來參照 Web 資源。

String

Optional

Image16by16Class

指定要用於 16x16 像素影像的 CSS 類別名稱。

String

Optional

Image16by16Left

指定要將 16x16 像素影像向左移的像素數目。這是由負數代表。

Non positive Integer

Optional

Image16by16Top

指定要將 16x16 像素影像移至頂端的像素數目。這是由負數代表。

Non positive Integer

Optional

Image32by32

指定 32x32 像素影像。這可以是影像檔的路徑,也可以透過 $webresource: 指示詞來參照 Web 資源。

String

Optional

Image32by32Class

指定要用於 16x16 像素影像的 CSS 類別名稱。

String

Optional

Image32by32Left

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

Non positive Integer

Optional

Image32by32Top

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

Non positive Integer

Optional

LabelText

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

String

Optional

MenuAlt

Alternative text to represent the menu.

String

Optional

MenuCommand

The name of the command to execute when the menu is clicked.

String

Optional

ModernImage

僅供內部使用。

String

Optional

PopulateDynamically

指定為此控制項提供選項的功能表元素會在執行階段使用 PopulateQueryCommand 屬性所定義的命令動態填入。

Boolean

Default = false.

Optional

PopulateOnlyOnce

動態填入控制項時,此設定表示只能呼叫一次 PopulateQueryCommand 屬性所定義的命令。

Boolean

Default = false.

Optional

PopulateQueryCommand

動態填入控制項時,此命令會擷取為此控制項提供選項的功能表元素。

String

Optional

Sequence

藉由將 Sequence 值設定為高於或低於現有功能區元素,以指定功能區修改的位置。

Integer

Optional

TemplateAlias

將 CommandUIDefinition 的功能區子元素與 Layout 元素之子元素內的預留位置產生關聯。此值定義當配置變更時,控制項在控制項群組內顯示的位置。

String

Optional

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

<Menu> (RibbonDiffXml)

指定用於顯示快取功能表的容器。

上層元素

Element Description

<CommandUIDefinition> (RibbonDiffXml)

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

<Controls> (RibbonDiffXml)

包含控制項的集合。

備註

If this element does not have any <Menu> elements and does not have a valid PopulateQueryCommand, the application will throw the following script error at run time: ‘attrs' is null or not an object.

元素資訊

XPath

//RibbonDiffXml/CustomActions/CustomAction/CommandUIDefinition/SplitButton |
//Controls/SplitButton

Schema Name

SplitButtonType

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.