Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

public string Caption { get; set; }

#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”:

DXMenuItem_BeginGroup

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:

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.

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.

See Also