1 type derived from KeyGesture
System.Activities.Presentation (1)
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (1)
120
internal sealed class ChordKeyGesture :
KeyGesture
63 instantiations of KeyGesture
PresentationCore (4)
Core\CSharp\System\Windows\Input\Command\KeyBinding.cs (2)
71
this(command, new
KeyGesture
(key, modifiers))
206
Gesture = new
KeyGesture
(key, modifiers, /*validateGesture = */ false);
Core\CSharp\System\Windows\Input\Command\KeyGestureConverter.cs (2)
94
return new
KeyGesture
(Key.None);
134
return new
KeyGesture
((Key)resultkey, modifiers, displayString);
PresentationFramework (44)
src\Framework\MS\Internal\Commands\CommandHelpers.cs (3)
38
PrivateRegisterCommandHandler(controlType, command, executedRoutedEventHandler, null, new
KeyGesture
(key));
62
PrivateRegisterCommandHandler(controlType, command, executedRoutedEventHandler, canExecuteRoutedEventHandler, new
KeyGesture
(key));
82
PrivateRegisterCommandHandler(controlType, command, executedRoutedEventHandler, canExecuteRoutedEventHandler, new
KeyGesture
(key, modifierKeys));
src\Framework\System\Windows\Controls\DataGrid.cs (2)
61
CommandManager.RegisterClassInputBinding(ownerType, new InputBinding(BeginEditCommand, new
KeyGesture
(Key.F2)));
66
CommandManager.RegisterClassInputBinding(ownerType, new InputBinding(CancelEditCommand, new
KeyGesture
(Key.Escape)));
src\Framework\System\Windows\Controls\DocumentViewer.cs (16)
1540
new
KeyGesture
(Key.D2, ModifierKeys.Control));
1670
new
KeyGesture
(Key.Add, ModifierKeys.Control),
1672
new
KeyGesture
(Key.Add, ModifierKeys.Shift | ModifierKeys.Control),
1674
new
KeyGesture
(Key.OemPlus, ModifierKeys.Control),
1676
new
KeyGesture
(Key.OemPlus, ModifierKeys.Shift | ModifierKeys.Control));
1686
new
KeyGesture
(Key.Subtract, ModifierKeys.Control),
1688
new
KeyGesture
(Key.Subtract, ModifierKeys.Shift | ModifierKeys.Control),
1690
new
KeyGesture
(Key.OemMinus, ModifierKeys.Control),
1692
new
KeyGesture
(Key.OemMinus, ModifierKeys.Shift | ModifierKeys.Control));
1699
new
KeyGesture
(Key.PageUp, ModifierKeys.Control));
1706
new
KeyGesture
(Key.PageDown, ModifierKeys.Control));
1713
new
KeyGesture
(Key.Home, ModifierKeys.Control));
1720
new
KeyGesture
(Key.End, ModifierKeys.Control));
1731
new
KeyGesture
(Key.D1, ModifierKeys.Control));
1741
new
KeyGesture
(Key.D3, ModifierKeys.Control));
1751
new
KeyGesture
(Key.D4, ModifierKeys.Control));
src\Framework\System\Windows\Controls\FlowDocumentReader.cs (2)
1375
executedHandler, canExecuteHandler, new
KeyGesture
(Key.OemPlus, ModifierKeys.Control));
1379
executedHandler, canExecuteHandler, new
KeyGesture
(Key.OemMinus, ModifierKeys.Control));
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (6)
1371
executedHandler, canExecuteHandler, new
KeyGesture
(Key.Home), new
KeyGesture
(Key.Home, ModifierKeys.Control));
1375
executedHandler, canExecuteHandler, new
KeyGesture
(Key.End), new
KeyGesture
(Key.End, ModifierKeys.Control));
1379
executedHandler, canExecuteHandler, new
KeyGesture
(Key.OemPlus, ModifierKeys.Control));
1383
executedHandler, canExecuteHandler, new
KeyGesture
(Key.OemMinus, ModifierKeys.Control));
src\Framework\System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1497
executedHandler, canExecuteHandler, new
KeyGesture
(Key.P, ModifierKeys.Control));
src\Framework\System\Windows\Controls\Primitives\ScrollBar.cs (2)
711
CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToTopCommand, onScrollCommand, onQueryScrollCommand, new
KeyGesture
(Key.Home, ModifierKeys.Control));
712
CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToBottomCommand, onScrollCommand, onQueryScrollCommand, new
KeyGesture
(Key.End, ModifierKeys.Control));
src\Framework\System\Windows\Controls\SinglePageViewer.cs (12)
1273
executedHandler, canExecuteHandler, new
KeyGesture
(Key.OemPlus, ModifierKeys.Control));
1277
executedHandler, canExecuteHandler, new
KeyGesture
(Key.OemMinus, ModifierKeys.Control));
1280
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.PreviousPage, new
KeyGesture
(Key.Left)));
1281
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.PreviousPage, new
KeyGesture
(Key.Up)));
1282
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.PreviousPage, new
KeyGesture
(Key.PageUp)));
1283
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.NextPage, new
KeyGesture
(Key.Right)));
1284
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.NextPage, new
KeyGesture
(Key.Down)));
1285
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.NextPage, new
KeyGesture
(Key.PageDown)));
1286
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.FirstPage, new
KeyGesture
(Key.Home)));
1287
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.FirstPage, new
KeyGesture
(Key.Home, ModifierKeys.Control)));
1288
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.LastPage, new
KeyGesture
(Key.End)));
1289
CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.LastPage, new
KeyGesture
(Key.End, ModifierKeys.Control)));
System.Activities.Presentation (15)
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (15)
38
new
KeyGesture
(Key.OemPlus, ModifierKeys.Control, "Ctrl +"),
39
new
KeyGesture
(Key.Add, ModifierKeys.Control) });
42
new
KeyGesture
(Key.OemMinus, ModifierKeys.Control, "Ctrl -"),
43
new
KeyGesture
(Key.Subtract, ModifierKeys.Control) });
55
new List<KeyGesture> { new
KeyGesture
(Key.F6, ModifierKeys.Control | ModifierKeys.Alt, "Ctrl + Alt + F6") });
57
new List<KeyGesture> { new
KeyGesture
(Key.Right, ModifierKeys.Alt, "Alt + Right Arrow") });
59
new List<KeyGesture> { new
KeyGesture
(Key.J, ModifierKeys.Control, "Ctrl + J") });
69
new List<KeyGesture> { new
KeyGesture
(Key.X, ModifierKeys.Control) });
71
new List<KeyGesture> { new
KeyGesture
(Key.C, ModifierKeys.Control) });
73
new List<KeyGesture> { new
KeyGesture
(Key.V, ModifierKeys.Control) });
75
new List<KeyGesture> { new
KeyGesture
(Key.A, ModifierKeys.Control) });
77
new List<KeyGesture> { new
KeyGesture
(Key.Z, ModifierKeys.Control) });
79
new List<KeyGesture> { new
KeyGesture
(Key.Y, ModifierKeys.Control) });
81
new List<KeyGesture> { new
KeyGesture
(Key.Decimal, ModifierKeys.Alt) });
83
new List<KeyGesture> { new
KeyGesture
(Key.OemComma, ModifierKeys.Alt) });
157 references to KeyGesture
PresentationCore (103)
Core\CSharp\System\Windows\Input\Command\ApplicationCommands.cs (19)
351
KeyGesture
.AddGesturesFromResourceStrings(
357
KeyGesture
.AddGesturesFromResourceStrings(
363
KeyGesture
.AddGesturesFromResourceStrings(
369
KeyGesture
.AddGesturesFromResourceStrings(
375
KeyGesture
.AddGesturesFromResourceStrings(
381
KeyGesture
.AddGesturesFromResourceStrings(
387
KeyGesture
.AddGesturesFromResourceStrings(
393
KeyGesture
.AddGesturesFromResourceStrings(
399
KeyGesture
.AddGesturesFromResourceStrings(
405
KeyGesture
.AddGesturesFromResourceStrings(
411
KeyGesture
.AddGesturesFromResourceStrings(
417
KeyGesture
.AddGesturesFromResourceStrings(
423
KeyGesture
.AddGesturesFromResourceStrings(
431
KeyGesture
.AddGesturesFromResourceStrings(
439
KeyGesture
.AddGesturesFromResourceStrings(
447
KeyGesture
.AddGesturesFromResourceStrings(
453
KeyGesture
.AddGesturesFromResourceStrings(
459
KeyGesture
.AddGesturesFromResourceStrings(
465
KeyGesture
.AddGesturesFromResourceStrings(
Core\CSharp\System\Windows\Input\Command\ComponentCommands.cs (27)
351
KeyGesture
.AddGesturesFromResourceStrings(
357
KeyGesture
.AddGesturesFromResourceStrings(
363
KeyGesture
.AddGesturesFromResourceStrings(
369
KeyGesture
.AddGesturesFromResourceStrings(
375
KeyGesture
.AddGesturesFromResourceStrings(
381
KeyGesture
.AddGesturesFromResourceStrings(
387
KeyGesture
.AddGesturesFromResourceStrings(
393
KeyGesture
.AddGesturesFromResourceStrings(
399
KeyGesture
.AddGesturesFromResourceStrings(
405
KeyGesture
.AddGesturesFromResourceStrings(
411
KeyGesture
.AddGesturesFromResourceStrings(
417
KeyGesture
.AddGesturesFromResourceStrings(
423
KeyGesture
.AddGesturesFromResourceStrings(
429
KeyGesture
.AddGesturesFromResourceStrings(
435
KeyGesture
.AddGesturesFromResourceStrings(
441
KeyGesture
.AddGesturesFromResourceStrings(
447
KeyGesture
.AddGesturesFromResourceStrings(
453
KeyGesture
.AddGesturesFromResourceStrings(
459
KeyGesture
.AddGesturesFromResourceStrings(
465
KeyGesture
.AddGesturesFromResourceStrings(
471
KeyGesture
.AddGesturesFromResourceStrings(
477
KeyGesture
.AddGesturesFromResourceStrings(
483
KeyGesture
.AddGesturesFromResourceStrings(
489
KeyGesture
.AddGesturesFromResourceStrings(
495
KeyGesture
.AddGesturesFromResourceStrings(
501
KeyGesture
.AddGesturesFromResourceStrings(
507
KeyGesture
.AddGesturesFromResourceStrings(
Core\CSharp\System\Windows\Input\Command\KeyBinding.cs (6)
59
public KeyBinding(ICommand command,
KeyGesture
gesture) : base(command, gesture)
92
return base.Gesture as
KeyGesture
;
96
KeyGesture
keyGesture = value as
KeyGesture
;
104
throw new ArgumentException(SR.Get(SRID.InputBinding_ExpectedInputGesture, typeof(
KeyGesture
)));
179
private void SynchronizePropertiesFromGesture(
KeyGesture
keyGesture)
Core\CSharp\System\Windows\Input\Command\KeyGesture.cs (3)
283
KeyGesture
keyGesture = CreateFromResourceStrings(keyGestureToken, keyDisplayString);
292
internal static
KeyGesture
CreateFromResourceStrings(string keyGestureToken, string keyDisplayString)
301
return _keyGestureConverter.ConvertFromInvariantString(keyGestureToken) as
KeyGesture
;
Core\CSharp\System\Windows\Input\Command\KeyGestureConverter.cs (4)
70
KeyGesture
keyGesture = context.Instance as
KeyGesture
;
157
KeyGesture
keyGesture = value as
KeyGesture
;
Core\CSharp\System\Windows\Input\Command\KeyGestureValueSerializer.cs (4)
54
KeyGesture
keyGesture = value as
KeyGesture
;
71
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
KeyGesture
));
86
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
KeyGesture
));
Core\CSharp\System\Windows\Input\Command\MediaCommands.cs (24)
308
KeyGesture
.AddGesturesFromResourceStrings(
314
KeyGesture
.AddGesturesFromResourceStrings(
320
KeyGesture
.AddGesturesFromResourceStrings(
326
KeyGesture
.AddGesturesFromResourceStrings(
332
KeyGesture
.AddGesturesFromResourceStrings(
338
KeyGesture
.AddGesturesFromResourceStrings(
344
KeyGesture
.AddGesturesFromResourceStrings(
350
KeyGesture
.AddGesturesFromResourceStrings(
356
KeyGesture
.AddGesturesFromResourceStrings(
362
KeyGesture
.AddGesturesFromResourceStrings(
368
KeyGesture
.AddGesturesFromResourceStrings(
374
KeyGesture
.AddGesturesFromResourceStrings(
380
KeyGesture
.AddGesturesFromResourceStrings(
386
KeyGesture
.AddGesturesFromResourceStrings(
392
KeyGesture
.AddGesturesFromResourceStrings(
398
KeyGesture
.AddGesturesFromResourceStrings(
404
KeyGesture
.AddGesturesFromResourceStrings(
410
KeyGesture
.AddGesturesFromResourceStrings(
416
KeyGesture
.AddGesturesFromResourceStrings(
422
KeyGesture
.AddGesturesFromResourceStrings(
428
KeyGesture
.AddGesturesFromResourceStrings(
434
KeyGesture
.AddGesturesFromResourceStrings(
440
KeyGesture
.AddGesturesFromResourceStrings(
446
KeyGesture
.AddGesturesFromResourceStrings(
Core\CSharp\System\Windows\Input\Command\NavigationCommands.cs (16)
244
KeyGesture
.AddGesturesFromResourceStrings(
250
KeyGesture
.AddGesturesFromResourceStrings(
256
KeyGesture
.AddGesturesFromResourceStrings(
262
KeyGesture
.AddGesturesFromResourceStrings(
268
KeyGesture
.AddGesturesFromResourceStrings(
274
KeyGesture
.AddGesturesFromResourceStrings(
280
KeyGesture
.AddGesturesFromResourceStrings(
286
KeyGesture
.AddGesturesFromResourceStrings(
292
KeyGesture
.AddGesturesFromResourceStrings(
298
KeyGesture
.AddGesturesFromResourceStrings(
304
KeyGesture
.AddGesturesFromResourceStrings(
310
KeyGesture
.AddGesturesFromResourceStrings(
316
KeyGesture
.AddGesturesFromResourceStrings(
322
KeyGesture
.AddGesturesFromResourceStrings(
328
KeyGesture
.AddGesturesFromResourceStrings(
334
KeyGesture
.AddGesturesFromResourceStrings(
PresentationFramework (18)
src\Framework\MS\Internal\Commands\CommandHelpers.cs (2)
89
KeyGesture
.CreateFromResourceStrings(SR.Get(srid1), SR.Get(srid2)));
96
KeyGesture
.CreateFromResourceStrings(SR.Get(srid1), SR.Get(srid2)));
src\Framework\System\Windows\Controls\InkCanvas.cs (1)
2608
InputGesture pasteInputGesture =
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyShiftInsert), SR.Get(SRID.KeyShiftInsertDisplayString));
src\Framework\System\Windows\Controls\ListBox.cs (1)
80
CommandHelpers.RegisterCommandHandler(typeof(ListBox), ListBox.SelectAllCommand, new ExecutedRoutedEventHandler(OnSelectAll), new CanExecuteRoutedEventHandler(OnQueryStatusSelectAll),
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.ListBoxSelectAllKey), SR.Get(SRID.ListBoxSelectAllKeyDisplayString)));
src\Framework\System\Windows\Controls\MenuItem.cs (2)
1133
KeyGesture
keyGesture = ((IList)col)[i] as
KeyGesture
;
src\Framework\System\windows\Documents\TextEditor.cs (2)
422
CommandHelpers.RegisterCommandHandler(controlType, ApplicationCommands.Undo, new ExecutedRoutedEventHandler(OnUndo), new CanExecuteRoutedEventHandler(OnQueryStatusUndo),
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyUndo), SR.Get(SRID.KeyUndoDisplayString)),
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyAltUndo), SR.Get(SRID.KeyAltUndoDisplayString)));
src\Framework\System\windows\Documents\TextEditorCopyPaste.cs (5)
59
CommandHelpers.RegisterCommandHandler(controlType, ApplicationCommands.Copy, new ExecutedRoutedEventHandler(OnCopy), new CanExecuteRoutedEventHandler(OnQueryStatusCopy),
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyCopy), SR.Get(SRID.KeyCopyDisplayString)),
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyCtrlInsert), SR.Get(SRID.KeyCtrlInsertDisplayString)));
66
CommandHelpers.RegisterCommandHandler(controlType, ApplicationCommands.Cut, new ExecutedRoutedEventHandler(OnCut), new CanExecuteRoutedEventHandler(OnQueryStatusCut),
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyCut), SR.Get(SRID.KeyCutDisplayString)),
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyShiftDelete), SR.Get(SRID.KeyShiftDeleteDisplayString)));
70
InputGesture inputGesture =
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyShiftInsert), SR.Get(SRID.KeyShiftInsertDisplayString));
src\Framework\System\windows\Documents\TextEditorTyping.cs (2)
93
CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.Backspace , new ExecutedRoutedEventHandler(OnBackspace) , onQueryStatusNYI ,
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyBackspace), SR.Get(SRID.KeyBackspaceDisplayString)),
KeyGesture
.CreateFromResourceStrings(SR.Get(SRID.KeyShiftBackspace), SR.Get(SRID.KeyShiftBackspaceDisplayString)) );
src\Framework\System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
431
case 339: t = () => typeof(
KeyGesture
); break;
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
6001
typeof(System.Windows.Input.
KeyGesture
),
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
5883
case KnownElements.KeyGesture: t = typeof(System.Windows.Input.
KeyGesture
); break;
System.Activities.Presentation (36)
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (33)
20
Dictionary<ICommand, List<
KeyGesture
>> defaultGestures = new Dictionary<ICommand, List<
KeyGesture
>>();
25
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.P) });
27
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.E) });
29
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.X) });
31
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.C) });
33
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.Y) });
35
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.R) });
37
new List<
KeyGesture
> {
41
new List<
KeyGesture
> {
45
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.A) });
47
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.V) });
49
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.I) });
51
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.O) });
53
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.N) });
55
new List<
KeyGesture
> { new KeyGesture(Key.F6, ModifierKeys.Control | ModifierKeys.Alt, "Ctrl + Alt + F6") });
57
new List<
KeyGesture
> { new KeyGesture(Key.Right, ModifierKeys.Alt, "Alt + Right Arrow") });
59
new List<
KeyGesture
> { new KeyGesture(Key.J, ModifierKeys.Control, "Ctrl + J") });
61
new List<
KeyGesture
> { new ChordKeyGesture(Key.K, Key.P) });
63
new List<
KeyGesture
> { new ChordKeyGesture(Key.K, Key.I) });
65
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.M) });
67
new List<
KeyGesture
> { new ChordKeyGesture(Key.E, Key.S) });
69
new List<
KeyGesture
> { new KeyGesture(Key.X, ModifierKeys.Control) });
71
new List<
KeyGesture
> { new KeyGesture(Key.C, ModifierKeys.Control) });
73
new List<
KeyGesture
> { new KeyGesture(Key.V, ModifierKeys.Control) });
75
new List<
KeyGesture
> { new KeyGesture(Key.A, ModifierKeys.Control) });
77
new List<
KeyGesture
> { new KeyGesture(Key.Z, ModifierKeys.Control) });
79
new List<
KeyGesture
> { new KeyGesture(Key.Y, ModifierKeys.Control) });
81
new List<
KeyGesture
> { new KeyGesture(Key.Decimal, ModifierKeys.Alt) });
83
new List<
KeyGesture
> { new KeyGesture(Key.OemComma, ModifierKeys.Alt) });
97
List<
KeyGesture
> gestures = null;
111
protected bool ContainsGesture(RoutedCommand cmd,
KeyGesture
gesture)
113
return cmd.InputGestures.OfType<
KeyGesture
>().Any(p => string.Equals(p.DisplayString, gesture.DisplayString));
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (3)
150
foreach (
KeyGesture
gesture in collection)
168
foreach (
KeyGesture
gesture in cmd.InputGestures)
206
foreach (
KeyGesture
gesture in cmd.InputGestures)