Back to Devexpress

SpreadsheetControl.RemoveShortcutKey(Keys, Keys) Method

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-dot-removeshortcutkey-x28-system-dot-windows-dot-forms-dot-keys-system-dot-windows-dot-forms-dot-keys-x29.md

latest2.4 KB
Original Source

SpreadsheetControl.RemoveShortcutKey(Keys, Keys) Method

Removes a command shortcut.

Namespace : DevExpress.Xpf.Spreadsheet

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

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public void RemoveShortcutKey(
    Keys key,
    Keys modifier
)
vb
Public Sub RemoveShortcutKey(
    key As Keys,
    modifier As Keys
)

Parameters

NameTypeDescription
keyKeys

A Keys enumeration member specifying a shortcut key.

| | modifier | Keys |

A Keys enumeration member specifying a modifier key.

|

Remarks

The SpreadsheetControl’s shortcuts should be removed after the control is initialized. The following example demonstrates how to remove the Ctrl+O shortcut, which allows users to load a document:

csharp
spreadsheetControl.RemoveShortcutKey(System.Windows.Forms.Keys.O, System.Windows.Forms.Keys.Control);
vb
spreadsheetControl.RemoveShortcutKey(System.Windows.Forms.Keys.O, System.Windows.Forms.Keys.Control)

To assign a command shortcut, use the SpreadsheetControl.AssignShortcutKeyToCommand method.

See Also

AssignShortcutKeyToCommand(Keys, Keys, SpreadsheetCommandId)

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace