<SplitButton> (RibbonDiffXml)

应用到: CRM 2016 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

指定此控件的功能区命令的 ID。

String

Optional

CommandMenuClose

指定菜单关闭时要运行的菜单命令的 ID。

String

Optional

CommandMenuOpen

指定菜单打开时要运行的功能区命令的 ID。

String

Optional

CommandType

允许指定不同类型的命令。

Valid values:

 

Value Description

General

不是特定的命令类型。

OptionSelection

当用户在选项组选择一个选项时生成的命令。

IgnoredByMenu

用于控件的命令,这些控件在被单击时不会关闭菜单。

Enumeration

Optional

Id

指定功能区元素的定义的唯一标识符。强烈建议的命名约定是使用句点分隔名称的各个部分,如:[解决方案标识符].[实体].[功能区].[函数].[元素名称]。例如: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

重要

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

通过将序列值设置为高于或低于现有功能区元素来指定功能区修改内容的位置。

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

指定要应用于随工具提示一起显示的 32x32 像素的图像的 CSS 类。

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 2016 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.