Back to Devexpress

SpreadsheetControl.AssignShortcutKeyToCommand(Keys, Keys, SpreadsheetCommandId) Method

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-dot-assignshortcutkeytocommand-x28-keys-keys-spreadsheetcommandid-x29.md

latest2.4 KB
Original Source

SpreadsheetControl.AssignShortcutKeyToCommand(Keys, Keys, SpreadsheetCommandId) Method

Assigns a shortcut key to a command.

Namespace : DevExpress.Xpf.Spreadsheet

Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public void AssignShortcutKeyToCommand(
    Keys key,
    Keys modifier,
    SpreadsheetCommandId commandId
)
vb
Public Sub AssignShortcutKeyToCommand(
    key As Keys,
    modifier As Keys,
    commandId As SpreadsheetCommandId
)

Parameters

NameTypeDescription
keyKeys

A Keys enumeration member specifying a key to assign.

| | modifier | Keys |

A Keys enumeration member specifying a modifier key.

| | commandId | DevExpress.XtraSpreadsheet.Commands.SpreadsheetCommandId |

A DevExpress.XtraSpreadsheet.Commands.SpreadsheetCommandId enumeration member specifying a command.

|

Remarks

The SpreadsheetControl’s shortcuts should be assigned after the control is initialized.

To remove a command shortcut, use the SpreadsheetControl.RemoveShortcutKey method.

See Also

RemoveShortcutKey(Keys, Keys)

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace