wpf-115867-controls-and-libraries-diagram-control-end-user-interaction-shortcuts.md
This table lists end-user keyboard shortcuts that are available by default.
Use the DiagramCommandsBase.RegisterHotKeys method to clear existing shortcuts or define new ones. The example below shows how set the F10 key as a shortcut that invokes the Print Preview and clear the shortcut associated with saving the diagram to a file.
diagram.Commands.RegisterHotKeys(x => {
x.RegisterHotKey(Key.F10, ModifierKeys.None, DiagramCommandsBase.ShowPrintPreviewCommand);
x.ClearHotKeys(DiagramCommandsBase.SaveFileCommand);
});
diagram.Commands.RegisterHotKeys(Sub(x)
x.RegisterHotKey(Key.F10, ModifierKeys.None, DiagramCommandsBase.ShowPrintPreviewCommand)
x.ClearHotKeys(DiagramCommandsBase.SaveFileCommand)
End Sub)