Explorar o código

Add CloseWindow and Maximise Shortcuts

Added CloseWindow shortcut (Ctrl-Q) and added to File Menu. Added MaximiseWindow shortcut (F11).
Polar %!s(int64=5) %!d(string=hai) anos
pai
achega
3c460e0345
Modificáronse 2 ficheiros con 3 adicións e 0 borrados
  1. 2 0
      PixiEditor/ViewModels/ViewModelMain.cs
  2. 1 0
      PixiEditor/Views/MainWindow.xaml

+ 2 - 0
PixiEditor/ViewModels/ViewModelMain.cs

@@ -279,6 +279,8 @@ namespace PixiEditor.ViewModels
                     new Shortcut(Key.Delete, DeletePixelsCommand),
                     new Shortcut(Key.I, OpenResizePopupCommand, modifier: ModifierKeys.Control | ModifierKeys.Shift),
                     new Shortcut(Key.C, OpenResizePopupCommand, "canvas", ModifierKeys.Control | ModifierKeys.Shift),
+                    new Shortcut(Key.Q, SystemCommands.CloseWindowCommand, modifier: ModifierKeys.Control),
+                    new Shortcut(Key.F11, SystemCommands.MaximizeWindowCommand),
                     //File
                     new Shortcut(Key.O, OpenFileCommand, modifier: ModifierKeys.Control),
                     new Shortcut(Key.S, ExportFileCommand,

+ 1 - 0
PixiEditor/Views/MainWindow.xaml

@@ -82,6 +82,7 @@
                     <MenuItem Header="_Save As..." InputGestureText="Ctrl+Shift+S"
                               Command="{Binding SaveDocumentCommand}" CommandParameter="AsNew" />
                     <MenuItem Header="_Export" InputGestureText="Ctrl+Shift+Alt+S" Command="{Binding ExportFileCommand}" />
+                    <MenuItem Header="_Exit" InputGestureText="Ctrl+Q" Command="{x:Static SystemCommands.CloseWindowCommand}" />
                 </MenuItem>
                 <MenuItem Header="_Edit">
                     <MenuItem Header="_Undo" InputGestureText="Ctrl+Z" Command="{Binding UndoCommand}" />