DXMenuItem.Caption Property
Specifies the text displayed within the menu item.
Namespace: DevExpress.Utils.Menu
Assembly: DevExpress.Utils.v24.2.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
#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 Appearance.TextOptions.HotkeyPrefix
option is enabled, 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 Bar
- Editor
Container descendants (GridControl , TreeList , VGridControl , etc ) - Scheduler
Control - Pivot
Grid Control - Layout
Control - Base
Edit descendants (TextEdit , PictureEdit , etc)
To allow popup menus to be displayed using the Bar Manager component, place a BarMenu
property. See the Editor
#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.