/// <summary> /// Gets the collection of default gestures for the specified command. /// </summary> private static InputGestureCollection GetInputGestures(String name) { var gestures = new InputGestureCollection(); switch (name) { case nameof(TogglePlayPause): gestures.Add(new KeyGesture(Key.AudioPlay, ModifierKeys.None, "Play")); break; case nameof(Stop): gestures.Add(new KeyGesture(Key.AudioStop, ModifierKeys.None, "Stop")); break; case nameof(NextTrack): gestures.Add(new KeyGesture(Key.AudioNext, ModifierKeys.None, "Next")); break; case nameof(PreviousTrack): gestures.Add(new KeyGesture(Key.AudioPrev, ModifierKeys.None, "Prev")); break; case nameof(MuteVolume): gestures.Add(new KeyGesture(Key.AudioMute, ModifierKeys.None, "Mute")); break; case nameof(IncreaseVolume): gestures.Add(new KeyGesture(Key.VolumeUp, ModifierKeys.None, "VolumeUp")); break; case nameof(DecreaseVolume): gestures.Add(new KeyGesture(Key.VolumeDown, ModifierKeys.None, "VolumeDown")); break; } return(gestures); }
/// <summary> /// Gets the collection of default gestures for the specified command. /// </summary> private static InputGestureCollection GetInputGestures(String name) { var gestures = new InputGestureCollection(); switch (name) { case nameof(ScrollPageUp): gestures.Add(new KeyGesture(Key.PageUp, ModifierKeys.None, "PageUp")); break; case nameof(ScrollPageDown): gestures.Add(new KeyGesture(Key.PageDown, ModifierKeys.None, "PageDown")); break; case nameof(MoveLeft): gestures.Add(new KeyGesture(Key.Left, ModifierKeys.None, "Left")); gestures.Add(new GamePadGesture(GamePadButton.LeftStickLeft, 0, "LeftStickLeft")); break; case nameof(MoveRight): gestures.Add(new KeyGesture(Key.Right, ModifierKeys.None, "Right")); gestures.Add(new GamePadGesture(GamePadButton.LeftStickRight, 0, "LeftStickRight")); break; case nameof(MoveUp): gestures.Add(new KeyGesture(Key.Up, ModifierKeys.None, "Up")); gestures.Add(new GamePadGesture(GamePadButton.LeftStickUp, 0, "LeftStickUp")); break; case nameof(MoveDown): gestures.Add(new KeyGesture(Key.Down, ModifierKeys.None, "Down")); gestures.Add(new GamePadGesture(GamePadButton.LeftStickDown, 0, "LeftStickDown")); break; case nameof(MoveToHome): gestures.Add(new KeyGesture(Key.Home, ModifierKeys.None, "Home")); break; case nameof(MoveToEnd): gestures.Add(new KeyGesture(Key.End, ModifierKeys.None, "End")); break; case nameof(MoveToPageUp): gestures.Add(new KeyGesture(Key.PageUp, ModifierKeys.None, "PageUp")); break; case nameof(MoveToPageDown): gestures.Add(new KeyGesture(Key.PageDown, ModifierKeys.None, "PageDown")); break; case nameof(ExtendSelectionUp): gestures.Add(new KeyGesture(Key.Up, ModifierKeys.Shift, "Shift+Up")); break; case nameof(ExtendSelectionDown): gestures.Add(new KeyGesture(Key.Down, ModifierKeys.Shift, "Shift+Down")); break; case nameof(ExtendSelectionLeft): gestures.Add(new KeyGesture(Key.Left, ModifierKeys.Shift, "Shift+Left")); break; case nameof(ExtendSelectionRight): gestures.Add(new KeyGesture(Key.Right, ModifierKeys.Shift, "Shift+Right")); break; case nameof(SelectToHome): gestures.Add(new KeyGesture(Key.Home, ModifierKeys.Shift, "Shift+Home")); break; case nameof(SelectToEnd): gestures.Add(new KeyGesture(Key.End, ModifierKeys.Shift, "Shift+End")); break; case nameof(SelectToPageUp): gestures.Add(new KeyGesture(Key.PageUp, ModifierKeys.Shift, "Shift+PageUp")); break; case nameof(SelectToPageDown): gestures.Add(new KeyGesture(Key.PageDown, ModifierKeys.Shift, "Shift+PageDown")); break; case nameof(MoveFocusUp): gestures.Add(new KeyGesture(Key.Up, ModifierKeys.Control, "Ctrl+Up")); break; case nameof(MoveFocusDown): gestures.Add(new KeyGesture(Key.Down, ModifierKeys.Control, "Ctrl+Down")); break; case nameof(MoveFocusForward): gestures.Add(new KeyGesture(Key.Right, ModifierKeys.Control, "Ctrl+Right")); break; case nameof(MoveFocusBack): gestures.Add(new KeyGesture(Key.Left, ModifierKeys.Control, "Ctrl+Left")); break; case nameof(MoveFocusPageUp): gestures.Add(new KeyGesture(Key.PageUp, ModifierKeys.Control, "Ctrl+PageUp")); break; case nameof(MoveFocusPageDown): gestures.Add(new KeyGesture(Key.PageDown, ModifierKeys.Control, "Ctrl+PageDown")); break; } return(gestures); }
/// <summary> /// Gets the collection of default gestures for the specified command. /// </summary> private static InputGestureCollection GetInputGestures(String name) { var gestures = new InputGestureCollection(); switch (name) { case nameof(BrowseBack): gestures.Add(new KeyGesture(Key.Left, ModifierKeys.Alt, "Alt+Left")); gestures.Add(new KeyGesture(Key.Backspace, ModifierKeys.None, "Backspace")); gestures.Add(new KeyGesture(Key.AppControlBack, ModifierKeys.None, "BrowserBack")); break; case nameof(BrowseForward): gestures.Add(new KeyGesture(Key.Right, ModifierKeys.Alt, "Alt+Right")); gestures.Add(new KeyGesture(Key.Backspace, ModifierKeys.Shift, "Shift+Backspace")); gestures.Add(new KeyGesture(Key.AppControlForward, ModifierKeys.None, "BrowserForward")); break; case nameof(BrowseStop): gestures.Add(new KeyGesture(Key.Escape, ModifierKeys.Alt, "Alt+Esc")); gestures.Add(new KeyGesture(Key.AppControlHome, ModifierKeys.None, "BrowserHome")); break; case nameof(Refresh): gestures.Add(new KeyGesture(Key.F5, ModifierKeys.None, "F5")); gestures.Add(new KeyGesture(Key.AppControlRefresh, ModifierKeys.None, "BrowserRefresh")); break; case nameof(Favorites): gestures.Add(new KeyGesture(Key.I, ModifierKeys.Control, "Ctrl+I")); gestures.Add(new KeyGesture(Key.AppControlBookmarks, ModifierKeys.None, "BrowserFavorites")); break; case nameof(Search): gestures.Add(new KeyGesture(Key.F3, ModifierKeys.None, "F3")); gestures.Add(new KeyGesture(Key.AppControlSearch, ModifierKeys.None, "BrowserSearch")); break; } return(gestures); }
/// <summary> /// Gets the collection of default gestures for the specified command. /// </summary> private static InputGestureCollection GetInputGestures(String name) { var gestures = new InputGestureCollection(); switch (name) { case nameof(Cut): gestures.Add(new KeyGesture(Key.X, ModifierKeys.Control, "Ctrl+X")); gestures.Add(new KeyGesture(Key.Delete, ModifierKeys.Shift, "Shift+Delete")); break; case nameof(Copy): gestures.Add(new KeyGesture(Key.C, ModifierKeys.Control, "Ctrl+C")); gestures.Add(new KeyGesture(Key.Insert, ModifierKeys.Control, "Ctrl+Insert")); break; case nameof(Paste): gestures.Add(new KeyGesture(Key.V, ModifierKeys.Control, "Ctrl+V")); gestures.Add(new KeyGesture(Key.Insert, ModifierKeys.Shift, "Shift+Insert")); break; case nameof(Delete): gestures.Add(new KeyGesture(Key.Delete, ModifierKeys.None, "Del")); break; case nameof(Undo): gestures.Add(new KeyGesture(Key.Z, ModifierKeys.Control, "Ctrl+Z")); break; case nameof(Redo): gestures.Add(new KeyGesture(Key.Y, ModifierKeys.Control, "Ctrl+Y")); break; case nameof(Find): gestures.Add(new KeyGesture(Key.F, ModifierKeys.Control, "Ctrl+F")); break; case nameof(Replace): gestures.Add(new KeyGesture(Key.H, ModifierKeys.Control, "Ctrl+H")); break; case nameof(SelectAll): gestures.Add(new KeyGesture(Key.A, ModifierKeys.Control, "Ctrl+A")); break; case nameof(Help): gestures.Add(new KeyGesture(Key.F1, ModifierKeys.None, "F1")); break; case nameof(New): gestures.Add(new KeyGesture(Key.N, ModifierKeys.Control, "Ctrl+N")); break; case nameof(Open): gestures.Add(new KeyGesture(Key.O, ModifierKeys.Control, "Ctrl+O")); break; case nameof(Save): gestures.Add(new KeyGesture(Key.S, ModifierKeys.Control, "Ctrl+S")); break; case nameof(Print): gestures.Add(new KeyGesture(Key.P, ModifierKeys.Control, "Ctrl+P")); break; case nameof(PrintPreview): gestures.Add(new KeyGesture(Key.F2, ModifierKeys.Control, "Ctrl+F2")); break; case nameof(Properties): gestures.Add(new KeyGesture(Key.F4, ModifierKeys.None, "F4")); break; case nameof(ContextMenu): gestures.Add(new KeyGesture(Key.F10, ModifierKeys.Shift, "Shift+F10")); gestures.Add(new KeyGesture(Key.Application, ModifierKeys.None, "Apps")); break; case nameof(Stop): gestures.Add(new KeyGesture(Key.Escape, ModifierKeys.None, "Esc")); break; } return(gestures); }