分享方式:


<MenuSection> (RibbonDiffXml)

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

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

語法

<MenuSection
 DisplayMode=["Default" | "Small" | "Medium"  | "Large"  | "Text"  | "Menu"  | "Menu16"  | "Menu32"  | "Thin"]
 Id="String"
 MaxHeight="String"
 Scrollable="true"
 Sequence="Integer"
 Title="String">
 [<Controls /> | <Gallery />]
</MenuSection>

屬性和元素

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

屬性

Attribute Description Type Usage

DisplayMode

控制用於顯示元素的模式。

Valid values:

 

Value Description

Menu

如功能表般顯示元素。

Menu16

在功能表中以 16 像素高度顯示元素。

Menu32

在功能表中以 32 像素高度顯示元素。

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

MaxHeight

Specifies the maximum height of the section in pixels.

String

Optional

Scrollable

Specifies whether to make this section of the menu scrollable. Set to true to make scrollable. The default is false.

Boolean

Optional

Sequence

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

Integer

Optional

Title

Species the label to display for the MenuSection.

String

Optional

子元素

Element Description

<Controls> (RibbonDiffXml)

包含控制項的集合。

<Gallery> (RibbonDiffXml)

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

上層元素

Element Description

<Menu> (RibbonDiffXml)

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

備註

You may get the following error “MenuSections can only have children of type MenuItem, Gallery or GroupPopup.” when viewing a Ribbon that has a MenuSectionDisplayMode attribute value set to the following values: Default, Small, Medium, Large, Text, Thin. While according to the RibbonWSS.xsd these are valid values, they should not be used.

元素資訊

XPath

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

Schema Name

MenuSectionType

Validation File

RibbonWSS.xsd

Can be Empty

請參閱

其他資源

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.