Skip to main content
A newer version of this page is available. .
Bar

BarItem.ShowItemShortcut Property

Gets or sets whether this BarItem should display its shortcut in sub-menus and pop-up menus.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean ShowItemShortcut { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

A DefaultBoolean enumerator value that specifies whether this BarItem should display its shortcut in sub-menus and pop-up menus.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

BarItems can have keyboard shortcuts that allow your end-users to quickly perform the required action. These shortcuts can be set using the BarItem.ItemShortcut property. BarItem shortcuts are visible within sub-menus and pop-up menus if the ShowItemShortcut property equals DefaultBoolean.Default or DefaultBoolean.True. The figure below illustrates a sample pop-up menu, whose Undo, Copy, Cut and Paste items display their shortcuts, while the Clear and Select All items don’t.

BarItem - ShowItemShortcut

By default, the displayed text matches the keyboard combination set as the item shortcut. You can display the different text using the BarItem.ShortcutKeyDisplayString property.

See Also