Back to Devexpress

BarItem.ShowItemShortcut Property

windowsforms-devexpress-dot-xtrabars-dot-baritem-8cea0f58.md

latest2.8 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean ShowItemShortcut { get; set; }
vb
<DefaultValue(DefaultBoolean.Default)>
<DXCategory("Behavior")>
Public Property ShowItemShortcut As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

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

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

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.

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

ItemShortcut

ShortcutKeyDisplayString

BarItem Class

BarItem Members

DevExpress.XtraBars Namespace