Back to Devexpress

Shortcuts

windowsforms-116954-controls-and-libraries-diagrams-end-user-interaction-shortcuts.md

latest8.7 KB
Original Source

Shortcuts

  • Oct 29, 2020

This table lists end-user keyboard shortcuts that are available by default.

Keyboard ShortcutCommand
ESCDiagramCommandsBase.CancelCommand
DELETEDiagramCommandsBase.DeleteCommand
CTRL+CDiagramCommandsBase.CopyCommand
CTRL+VDiagramCommandsBase.PasteCommand
CTRL+XDiagramCommandsBase.CutCommand
CTRL+ADiagramCommandsBase.SelectAllCommand
CTRL+PlusDiagramCommandsBase.ZoomInCommand
CTRL+MinusDiagramCommandsBase.ZoomOutCommand
CTRL+SpaceDiagramCommandsBase.CollapseSelectedContainersCommand
CTRL+NDiagramCommandsBase.NewFileCommand
CTRL+ODiagramCommandsBase.OpenFileCommand
CTRL+SDiagramCommandsBase.SaveFileCommand
CTRL+PDiagramCommandsBase.ShowPrintPreviewCommand
CTRL+1DiagramCommandsBase.SelectToolCommand.WithParameter(CommandParameters.SelectTool_PointerTool)
CTRL+3DiagramCommandsBase.SelectToolCommand.WithParameter(CommandParameters.SelectTool_ConnectorTool)
CTRL+8DiagramCommandsBase.SelectToolCommand.WithParameter(CommandParameters.SelectTool_RectangleTool)
CTRL+9DiagramCommandsBase.SelectToolCommand.WithParameter(CommandParameters.SelectTool_EllipseTool)
CTRL+SHIFT+TDiagramCommandsBase.SetVerticalAlignmentCommand.WithParameter(VerticalAlignment.Top)
CTRL+SHIFT+MDiagramCommandsBase.SetVerticalAlignmentCommand.WithParameter(VerticalAlignment.Center)
CTRL+SHIFT+VDiagramCommandsBase.SetVerticalAlignmentCommand.WithParameter(VerticalAlignment.Bottom)
CTRL+SHIFT+LDiagramCommandsBase.SetHorizontalAlignmentCommand.WithParameter(VerticalAlignment.Left)
CTRL+SHIFT+RDiagramCommandsBase.SetHorizontalAlignmentCommand.WithParameter(VerticalAlignment.Right)
CTRL+SHIFT+CDiagramCommandsBase.SetHorizontalAlignmentCommand.WithParameter(VerticalAlignment.Center)
CTRL+SHIFT+JDiagramCommandsBase.SetHorizontalAlignmentCommand.WithParameter(VerticalAlignment.Justify)
CTRL+SHIFT+SDiagramCommandsBase.SaveFileAsCommand
CTRL+ZDiagramCommandsBase.UndoCommand
CTRL+YDiagramCommandsBase.RedoCommand
CTRL+SHIFT+ZDiagramCommandsBase.RedoCommand
F2DiagramCommandsBase.EditCommand
F4DiagramCommandsBase.ShowPropertiesPanelCommand
CTRL+LEFT ARROWDiagramCommandsBase.MoveSelectionNoSnapCommand.WithParameter(Direction.Left)
LEFT ARROWDiagramCommandsBase.MoveSelectionCommand.WithParameter(Direction.Left)
CTRL+UP ARROWDiagramCommandsBase.MoveSelectionNoSnapCommand.WithParameter(Direction.Up)
UP ARROWDiagramCommandsBase.MoveSelectionCommand.WithParameter(Direction.Up)
CTRL+RIGHT ARROWDiagramCommandsBase.MoveSelectionNoSnapCommand.WithParameter(Direction.Right)
RIGHT ARROWDiagramCommandsBase.MoveSelectionCommand.WithParameter(Direction.Right)
CTRL+DOWN ARROWDiagramCommandsBase.MoveSelectionNoSnapCommand.WithParameter(Direction.Down)
DOWN ARROWDiagramCommandsBase.MoveSelectionCommand.WithParameter(Direction.Down)
CTRL+SHIFT+PERIODDiagramCommandsBase.IncreaseFontSizeCommand
CTRL+SHIFT+COMMADiagramCommandsBase.DecreaseFontSizeCommand
CTRL+BDiagramCommandsBase.ToggleFontBoldCommand
CTRL+UDiagramCommandsBase.ToggleFontUnderlineCommand
CTRL+IDiagramCommandsBase.ToggleFontItalicCommand
CTRL+SHIFT+FDiagramCommandsBase.BringToFrontCommand
CTRL+SHIFT+BDiagramCommandsBase.SendToBackCommand
CTRL+SHIFT+WDiagramCommandsBase.FitToPageCommand
CTRL+SHIFT+TABDiagramCommandsBase.FocusPrevControlCommand
CTRL+TABDiagramCommandsBase.FocusNextControlCommand
SHIFT+TABDiagramCommandsBase.SelectPrevItemCommand
TABDiagramCommandsBase.SelectNextItemCommand

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.

csharp
diagram.Commands.RegisterHotKeys(x => {
                x.RegisterHotKey(Key.F10, ModifierKeys.None, DiagramCommandsBase.ShowPrintPreviewCommand);
                x.ClearHotKeys(DiagramCommandsBase.SaveFileCommand);
            });
vb
diagram.Commands.RegisterHotKeys(Sub(x)
    x.RegisterHotKey(Key.F10, ModifierKeys.None, DiagramCommandsBase.ShowPrintPreviewCommand)
    x.ClearHotKeys(DiagramCommandsBase.SaveFileCommand)
End Sub)