RichEditControl.RemoveShortcutKey(Keys, Keys) Method
Removes a command shortcut for all RichEdit views.
Namespace: DevExpress.Xpf.RichEdit
Assembly: DevExpress.Xpf.RichEdit.v20.2.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.RichEdit, DevExpress.Wpf.RichEdit
Declaration
Parameters
Name | Type | Description |
---|---|---|
key | Keys | A Keys enumeration member specifying a shortcut key. |
modifier | Keys | A Keys enumeration member specifying a modifier key. |
Remarks
The RichEditControl’s shortcuts should be removed after the control is initialized (e.g. in Window.Loaded event handler). The following example demonstrates how to remove the Ctrl+O shortcut, which allows users to load a document:
private void RichEditControl_Loaded(object sender, RoutedEventArgs e) {
richEditControl.RemoveShortcutKey(System.Windows.Forms.Keys.O, System.Windows.Forms.Keys.Control);
}
To assign a command shortcut, use the RichEditControl.AssignShortcutKeyToCommand method.
See Also