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.Shortcut Property

Gets or sets a shortcut displayed within the menu item

Namespace: DevExpress.Utils.Menu

Assembly: DevExpress.Utils.v24.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#Declaration

public Shortcut Shortcut { get; set; }

#Property Value

Type Description
Shortcut

A Shortcut value that specifies a shortcut.

#Remarks

A shortcut specified by the Shortcut property is only used for display purposes. The string that represents the shortcut is displayed at the right edge of the menu item. Pressing the specified key combination however doesn’t automatically invoke the event handler associated with the menu item’s DXMenuItem.Click event. If you assign shortcuts to the Shortcut properties you need to manually capture the corresponding key combinations being pressed and invoke the corresponding event handlers.

Shortcuts are displayed within menu items only if menus are rendered using an external BarManager component. To render a container control’s menus using a Bar Manager component, assign a Bar Manager instance to the control’s MenuManager property. For a GridControl, TreeList, VGridControl and PropertyGridControl controls, use their inherited EditorContainer.MenuManager property.

See Also