DXMenuItem.Caption Property
Specifies the text displayed within the menu item.
Namespace: DevExpress.Utils.Menu
Assembly: DevExpress.Utils.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
String | A string that specifies the text displayed within the menu item. |
Remarks
The Caption property can contain the ampersand character (‘&’). If the DXMenuItem.ShowHotKeyPrefix is set to true, the character that follows the ampersand is underscored and this indicates that it can be used as a shortcut. At runtime, an end-user can press this character to invoke the menu item’s functionality. For the second menu item in the image below, the Caption property is set to “&Merging Enabled”:
Note
Shortcuts specified this way are only in effect if a popup menu in a control is displayed using the BarManager component. Currently the following controls support popup menus to be displayed using the BarManager:
- EditorContainer descendants (GridControl, TreeList, VGridControl, etc )
- SchedulerControl
- PivotGridControl
- LayoutControl
- BaseEdit descendants (TextEdit, PictureEdit, etc)
To allow popup menus to be displayed using the Bar Manager component, place a BarManager object onto a form, and assign it to the control’s MenuManager property. See the EditorContainer.MenuManager property for more information.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Caption property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.