分享方式:


<Label> (RibbonDiffXml)

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

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

語法

<Label 
 Command="String"
 ForId="String"
 Id="String"
 Image16by16="String"
 Image16by16Class="String"
 Image16by16Left="Non Positive Integer"
 Image16by16Top="Non Positive Integer"
 LabelText="String"
 ModernImage=”String”
 QueryCommand="String"
 Sequence="Integer"
 TemplateAlias="String"
/>

屬性和元素

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

屬性

Attribute Description Type Usage

Command

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

String

Optional

ForId

The ID of the control that this control labels.

String

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.

> [!IMPORTANT] > If you don’t set a globally unique Id value, the ribbon might not display.

String

Required

Image16by16

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

String

Optional

Image16by16Left

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

Non positive integer

Optional

Image16by16Top

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

Non positive integer

Optional

LabelText

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

String

Optional

ModernImage

僅供內部使用。

String

Optional

QueryCommand

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

String

Optional

Sequence

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

Integer

Optional

TemplateAlias

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

String

Optional

子元素

此元素沒有子元素。

上層元素

Element Description

<CommandUIDefinition> (RibbonDiffXml)

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

元素資訊

XPath

//RibbonDiffXml/CustomActions/CustomAction/CommandUIDefinition/Label

Schema Name

LabelType

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.