BarShortcut Class
Contains item shortcut settings.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v18.1.dll
Declaration
[TypeConverter("DevExpress.XtraBars.TypeConverters.BarShortcutTypeConverter, DevExpress.XtraBars.v18.1.Design")]
public class BarShortcut
Related API Members
The following members accept/return BarShortcut objects:
Remarks
You can assign shortcuts to each item. This can be done using the BarItem.ItemShortcut property of items. This property is of the BarShortcut type.
Shortcuts specified using the BarShortcut object can contain up to two consecutive key combinations. For instance, you can specify the CTRL+K, CTRL+C sequence to be an item’s shortcut. At design time, the DevExpress Ribbon, Menu and Docking Library provides a convenient shortcut designer that can be used to specify the key sequence directly, by pressing it. See the screenshot below for an example.
At runtime, you need to use one of the BarShortcut constructors to specify shortcut settings.
Note
Do not assign system shortcuts to bar items. For instance, the Ctrl+A shortcut is used to select text in a text box. The Ctrl+C shortcut is used to copy a selected text. The Esc shortcut is used to close dropdown windows. Do not assign these shortcuts and such to bar items. Otherwise, conflicts and unpredictable results may occur.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the BarShortcut class.
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.