You are here:
MenuItem
The MenuItems element is a container for MenuItem elements that has no attributes, bindings, or events.
Required Editions
| Available in: Enterprise, Performance, and Unlimited Editions |
Application menus are menus that are linked to a certain use case rather than a UI control. They can be attached to all pages and all sections. Menus have menu items that execute certain actions within the application.
| Attribute | Description | Type | Binding Source | Required? |
|---|---|---|---|---|
| Image | The icon attribute of each data element. The icon is shown with each element | Image | Any image resource. | No, defaults to no image shown |
| Text | The text attribute of each data element. The text is shown with each element. | Label | Any label resource | No, defaults to no text shown |
No events are defined on menu level, but the ButtonPressedEvent events are available for menu items. ButtonPressedEvent is triggered when the user selects a menu item.
The table list the MenuItem properties
| Attribute | Description | Value or Pattern | Required? |
|---|---|---|---|
| id | Unique name of this MenuItem element | Any string | No |
| directlyVisible | Defines if the MenuItem element is visible on the PageHeader as a button (true) or in a menu (false). | Boolean | No |
MenuItem Bindings
The Bindings element consists of the Resource and Binding elements. The table lists the targets that are supported for the Resource and Binding elements in the MenuItem element.
| Attribute | Description | Value or Pattern |
|---|---|---|
| target | Defines the path of the MenuItem element. | string [Text; Item; Editable; Icon] |
| type | Defines how the resource is shown. | string [Image; Label; Editable; Visible] |
| binding | Source of the binding. | string |
| bindingMode | Binding mode is used to control the updating process. | string |
| id | Defines the Image Id or Label Id. | string |
Sample XML Code
VISIBILITY TYPE: BINDING
<MenuItem itemId="DemoMenuItem" directlyVisible="true">
<Bindings>
<Resource target="Text" type="Label" id="labelId" defaultLabel="defaultLabel" />
<Resource target="Icon" type="Image" id="ArrowEndDarkGrey24Inv" />
<Binding type="Visible" target="Visible" binding="visibilityBinding" />
<Binding type="Editable" target="Editable" binding="editabilityBinding" />
</Bindings>
<Events>
<ButtonPressedEvent event="DemoMenuItemPressed" />
</Events>
</MenuItem>
VISIBILITY TYPE: CALL
<MenuItem itemId="DemoMenuItem" directlyVisible="true">
<Bindings>
<Resource target="Text" type="Label" id="labelId" defaultLabel="defaultLabel" />
<Resource target="Icon" type="Image" id="ArrowEndDarkGrey24Inv" />
<Binding type="Visible" target="Visible" call="visibilityCall">
<Parameters>
<xml/>
</Parameters>
</Binding>
<Binding type="Editable" target="Editable" binding="editabilityBinding" />
</Bindings>
<Events>
<ButtonPressedEvent event="DemoMenuItemPressed" />
</Events>
</MenuItem>
VISIBILITY TYPE: NONE
<MenuItem itemId="DemoMenuItem" directlyVisible="true">
<Bindings>
<Resource target="Text" type="Label" id="labelId" defaultLabel="defaultLabel" />
<Resource target="Icon" type="Image" id="ArrowEndDarkGrey24Inv" />
<Binding type="Editable" target="Editable" binding="editabilityBinding" />
</Bindings>
<Events>
<ButtonPressedEvent event="DemoMenuItemPressed" />
</Events>
</MenuItem>Did this article solve your issue?
Let us know so we can improve!

