Dela via


<MenuSection> (RibbonDiffXml)

 

Applies To: Dynamics CRM 2013

Specifies a section used to divide a menu. A menu section can have a title and contain controls.

Syntax

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

Attributes and Elements

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

Attributes

Attribute

Description

Type

Usage

DisplayMode

Controls the mode used to display the element.

Valid values:

Value

Description

Menu

Displays the element like a menu.

Menu16

Displays the element in a menu with a height of 16 pixels.

Menu32

Displays the element in a menu with a height of 32 pixels.

Enumeration

Optional

Id

Specifies a unique identifier for the definition of a ribbon element. The strongly recommended naming convention is to use a period to separate the parts of the name like so: [solution identifier].[entity].[ribbon].[function].[element name]. For example: 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

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

Specify the location of the ribbon modification by setting the Sequence value higher or lower than existing ribbon elements.

Integer

Optional

Title

Species the label to display for the MenuSection.

String

Optional

Child Elements

Element

Description

<Controls> (RibbonDiffXml)

Contains a collection of controls.

<Gallery> (RibbonDiffXml)

Deprecated: Specified a control that displays a collection of related controls in the Ribbon. If there are too many items in the gallery, an expand arrow is provided to display the rest of the collection in a pane.

Parent Elements

Element

Description

<Menu> (RibbonDiffXml)

Specifies a container used to show pop-up menus.

Remarks

You may get the following error “MenuSections can only have children of type MenuItem, Gallery or GroupPopup.” when viewing a Ribbon that has a MenuSection DisplayMode 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.

Element Information

XPath

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

Schema Name

MenuSectionType

Validation File

RibbonWSS.xsd

Can be Empty

See Also

Ribbon XML reference
Customize commands and the ribbon