分享方式:


<GalleryButton> (RibbonDiffXml)

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

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

重要

This control was deprecated in Microsoft Dynamics CRM 2011. This control will not render with Microsoft Dynamics CRM 2015 和 Microsoft Dynamics CRM Online 2015 更新.

語法

<GalleryButton 
 Alt="String"
 Command="String"
 CommandPreview="String"
 CommandRevert="String"
 CommandType=["General" | "OptionSelection" | "IgnoredByMenu"]
 CommandValueId="String"
 ElementDimensions=
  ["Size16by16" |
  "Size32by32" |
  "Size48by48" |
  "Size64by48" |
  "Size72by96" |
  "Size96by72" |
  "Size96by96" |
  "Size128by128" |
  "Size190by30" |
  "Size190by40" |
  "Size190by50" |
  "Size190by60"]
 Id="String"
 Image="String"
 ImageClass="String"
 ImageLeft="Non Positive Integer"
 ImageTop="Non Positive Integer"
 InnerHTML="String"
 MenuItemId="String"
 QueryCommand="String"
 Sequence="Integer"
 TemplateAlias="String"
 ToolTipDescription="String"
 ToolTipHelpKeyWord="String"
 ToolTipImage32by32="String"
 ToolTipImage32by32Class="String"
 ToolTipImage32by32Left="Non Positive Integer"
 ToolTipImage32by32Top="Non Positive Integer"
 ToolTipShortcutKey="String"
 ToolTipTitle="String"
/>

屬性和元素

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

屬性

Attribute Description Type Usage

Alt

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

String

Optional

Command

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

String

Optional

CommandPreview

指定在選取控制項前游標停留在上方時執行的功能區命令識別碼。

String

Optional

CommandRevert

指定在使用者選取 [復原] 時執行的功能區命令識別碼。

String

Optional

CommandType

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

Valid values:

 

Value Description

General

不是特定類型的命令。

OptionSelection

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

IgnoredByMenu

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

Enumeration

Optional

CommandValueId

按一下按鈕時隨命令事件傳送的字串。

String

Optional

ElementDimensions

控制 Gallery 或 GalleryButton 元素的大小。

Valid values:

  • Size16by16

  • Size32by32

  • Size48by48

  • Size64by48

  • Size72by96

  • Size96by72

  • Size96by96

  • Size128by128

  • Size190by30

  • Size190by40

  • Size190by50

  • Size190by60

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

String

Required

Image

A server-relative URL to a file that contains an image to be used as an icon.If an Image attribute is not defined, an InnerHTML attribute must be defined.

String

Optional

ImageClass

The name of a CSS class selector to be applied to the image.

String

Optional

ImageLeft

A negative integer that represents an offset for the left edge of the image. Use this attribute when the Image attribute points to an image file that contains images for several icons.

Non positive Integer

Optional

ImageTop

A negative integer that represents an offset for the top edge of the image. Use this attribute when the Image attribute points to an image file that contains images for several icons.

Non positive Integer

Optional

InnerHTML

HTML markup that illustrates the choice that the button represents.If the InnerHTML attribute is not defined, the Image attribute must be defined.

String

Optional

MenuItemId

指定從控制項到功能表項目識別碼的參照。

String

Optional

QueryCommand

指定在輪詢狀態資訊時執行的命令名稱。

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

ToolTipShortcutKey

此元素未使用於 Microsoft Dynamics CRM。

String

Optional

ToolTipTitle

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

String

Optional

子元素

此元素沒有子元素。

上層元素

Element Description

<Gallery> (RibbonDiffXml)

已被取代:指定控制項在功能區中顯示相關的控制項集合。如果圖庫有太多項目,則會提供展開箭頭,於窗格中顯示集合中的其餘項目。

元素資訊

XPath

//RibbonDiffXml/CustomActions/CustomAction/CommandUIDefinition/Gallery/GalleryButton |
//Menu/MenuSection/Gallery/GalleryButton

Schema Name

GalleryButtonType

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.