1 instantiation of CommandManager
PresentationCore (1)
Core\CSharp\System\Windows\Input\Command\CommandManager.cs (1)
323
_commandManager = new
CommandManager
();
125 references to CommandManager
PresentationCore (38)
Core\CSharp\System\Windows\Generated\UIElement.cs (12)
858
EventManager.RegisterClassHandler(type,
CommandManager
.PreviewExecutedEvent, new ExecutedRoutedEventHandler(UIElement.OnPreviewExecutedThunk), false);
859
EventManager.RegisterClassHandler(type,
CommandManager
.ExecutedEvent, new ExecutedRoutedEventHandler(UIElement.OnExecutedThunk), false);
860
EventManager.RegisterClassHandler(type,
CommandManager
.PreviewCanExecuteEvent, new CanExecuteRoutedEventHandler(UIElement.OnPreviewCanExecuteThunk), false);
861
EventManager.RegisterClassHandler(type,
CommandManager
.CanExecuteEvent, new CanExecuteRoutedEventHandler(UIElement.OnCanExecuteThunk), false);
930
CommandManager
.TranslateInput((IInputElement)sender, e);
1353
CommandManager
.TranslateInput((IInputElement)sender, e);
2199
CommandManager
.TranslateInput((IInputElement)sender, e);
2466
CommandManager
.OnExecuted(sender, e);
2478
CommandManager
.OnExecuted(sender, e);
2490
CommandManager
.OnCanExecute(sender, e);
2502
CommandManager
.OnCanExecute(sender, e);
2514
CommandManager
.OnCommandDevice(sender, e);
Core\CSharp\System\Windows\Input\Command\CanExecuteChangedEventManager.cs (1)
463
if (sender is
CommandManager
)
Core\CSharp\System\Windows\Input\Command\CommandBinding.cs (3)
143
if (e.RoutedEvent ==
CommandManager
.CanExecuteEvent)
180
canExecuteArgs.RoutedEvent =
CommandManager
.CanExecuteEvent;
200
if (e.RoutedEvent ==
CommandManager
.ExecutedEvent)
Core\CSharp\System\Windows\Input\Command\CommandDevice.cs (1)
140
CommandManager
.InvalidateRequerySuggested();
Core\CSharp\System\Windows\Input\Command\CommandManager.cs (15)
52
typeof(
CommandManager
));
99
typeof(
CommandManager
));
146
typeof(
CommandManager
));
193
typeof(
CommandManager
));
307
CommandManager
.Current.RaiseRequerySuggested();
317
private static
CommandManager
Current
615
canExecuteArgs.RoutedEvent =
CommandManager
.CanExecuteEvent;
622
executedArgs.RoutedEvent =
CommandManager
.ExecutedEvent;
864
private static
CommandManager
_commandManager;
950
public static void AddHandler(
CommandManager
source, EventHandler handler)
961
public static void RemoveHandler(
CommandManager
source, EventHandler handler)
990
CommandManager
typedSource =
CommandManager
.Current;
999
CommandManager
typedSource =
CommandManager
.Current;
Core\CSharp\System\Windows\Input\Command\RoutedCommand.cs (6)
128
add {
CommandManager
.RequerySuggested += value; }
129
remove {
CommandManager
.RequerySuggested -= value; }
380
args.RoutedEvent =
CommandManager
.PreviewCanExecuteEvent;
384
args.RoutedEvent =
CommandManager
.CanExecuteEvent;
457
args.RoutedEvent =
CommandManager
.PreviewExecutedEvent;
482
args.RoutedEvent =
CommandManager
.ExecutedEvent;
PresentationFramework (87)
src\Framework\MS\Internal\AppModel\JournalNavigationScope.cs (1)
499
System.Windows.Input.
CommandManager
.InvalidateRequerySuggested();
src\Framework\MS\Internal\Commands\CommandHelpers.cs (2)
110
CommandManager
.RegisterClassCommandBinding(controlType, new CommandBinding(command, executedRoutedEventHandler, canExecuteRoutedEventHandler));
117
CommandManager
.RegisterClassInputBinding(controlType, new InputBinding(command, inputGestures[i]));
src\Framework\System\Windows\Annotations\AnnotationService.cs (18)
70
CommandManager
.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(CreateHighlightCommand, AnnotationHelper.OnCreateHighlightCommand, AnnotationHelper.OnQueryCreateHighlightCommand));
72
CommandManager
.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(CreateTextStickyNoteCommand, AnnotationHelper.OnCreateTextStickyNoteCommand, AnnotationHelper.OnQueryCreateTextStickyNoteCommand));
74
CommandManager
.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(CreateInkStickyNoteCommand, AnnotationHelper.OnCreateInkStickyNoteCommand, AnnotationHelper.OnQueryCreateInkStickyNoteCommand));
76
CommandManager
.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(ClearHighlightsCommand, AnnotationHelper.OnClearHighlightsCommand, AnnotationHelper.OnQueryClearHighlightsCommand));
78
CommandManager
.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(DeleteStickyNotesCommand, AnnotationHelper.OnDeleteStickyNotesCommand, AnnotationHelper.OnQueryDeleteStickyNotesCommand));
80
CommandManager
.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(DeleteAnnotationsCommand, AnnotationHelper.OnDeleteAnnotationsCommand, AnnotationHelper.OnQueryDeleteAnnotationsCommand));
82
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(CreateHighlightCommand, AnnotationHelper.OnCreateHighlightCommand, AnnotationHelper.OnQueryCreateHighlightCommand));
84
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(CreateTextStickyNoteCommand, AnnotationHelper.OnCreateTextStickyNoteCommand, AnnotationHelper.OnQueryCreateTextStickyNoteCommand));
86
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(CreateInkStickyNoteCommand, AnnotationHelper.OnCreateInkStickyNoteCommand, AnnotationHelper.OnQueryCreateInkStickyNoteCommand));
88
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(ClearHighlightsCommand, AnnotationHelper.OnClearHighlightsCommand, AnnotationHelper.OnQueryClearHighlightsCommand));
90
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(DeleteStickyNotesCommand, AnnotationHelper.OnDeleteStickyNotesCommand, AnnotationHelper.OnQueryDeleteStickyNotesCommand));
92
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(DeleteAnnotationsCommand, AnnotationHelper.OnDeleteAnnotationsCommand, AnnotationHelper.OnQueryDeleteAnnotationsCommand));
94
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(CreateHighlightCommand, AnnotationHelper.OnCreateHighlightCommand, AnnotationHelper.OnQueryCreateHighlightCommand));
96
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(CreateTextStickyNoteCommand, AnnotationHelper.OnCreateTextStickyNoteCommand, AnnotationHelper.OnQueryCreateTextStickyNoteCommand));
98
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(CreateInkStickyNoteCommand, AnnotationHelper.OnCreateInkStickyNoteCommand, AnnotationHelper.OnQueryCreateInkStickyNoteCommand));
100
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(ClearHighlightsCommand, AnnotationHelper.OnClearHighlightsCommand, AnnotationHelper.OnQueryClearHighlightsCommand));
102
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(DeleteStickyNotesCommand, AnnotationHelper.OnDeleteStickyNotesCommand, AnnotationHelper.OnQueryDeleteStickyNotesCommand));
104
CommandManager
.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(DeleteAnnotationsCommand, AnnotationHelper.OnDeleteAnnotationsCommand, AnnotationHelper.OnQueryDeleteAnnotationsCommand));
src\Framework\System\Windows\Controls\DataGrid.cs (22)
61
CommandManager
.RegisterClassInputBinding(ownerType, new InputBinding(BeginEditCommand, new KeyGesture(Key.F2)));
62
CommandManager
.RegisterClassCommandBinding(ownerType, new CommandBinding(BeginEditCommand, new ExecutedRoutedEventHandler(OnExecutedBeginEdit), new CanExecuteRoutedEventHandler(OnCanExecuteBeginEdit)));
64
CommandManager
.RegisterClassCommandBinding(ownerType, new CommandBinding(CommitEditCommand, new ExecutedRoutedEventHandler(OnExecutedCommitEdit), new CanExecuteRoutedEventHandler(OnCanExecuteCommitEdit)));
66
CommandManager
.RegisterClassInputBinding(ownerType, new InputBinding(CancelEditCommand, new KeyGesture(Key.Escape)));
67
CommandManager
.RegisterClassCommandBinding(ownerType, new CommandBinding(CancelEditCommand, new ExecutedRoutedEventHandler(OnExecutedCancelEdit), new CanExecuteRoutedEventHandler(OnCanExecuteCancelEdit)));
69
CommandManager
.RegisterClassCommandBinding(ownerType, new CommandBinding(SelectAllCommand, new ExecutedRoutedEventHandler(OnExecutedSelectAll), new CanExecuteRoutedEventHandler(OnCanExecuteSelectAll)));
71
CommandManager
.RegisterClassCommandBinding(ownerType, new CommandBinding(DeleteCommand, new ExecutedRoutedEventHandler(OnExecutedDelete), new CanExecuteRoutedEventHandler(OnCanExecuteDelete)));
74
CommandManager
.RegisterClassCommandBinding(typeof(DataGrid), new CommandBinding(ApplicationCommands.Copy, new ExecutedRoutedEventHandler(OnExecutedCopy), new CanExecuteRoutedEventHandler(OnCanExecuteCopy)));
2285
CommandManager
.InvalidateRequerySuggested();
2415
CommandManager
.InvalidateRequerySuggested();
2580
CommandManager
.InvalidateRequerySuggested();
2793
CommandManager
.InvalidateRequerySuggested();
3050
CommandManager
.InvalidateRequerySuggested();
3398
CommandManager
.InvalidateRequerySuggested();
3417
CommandManager
.InvalidateRequerySuggested();
3520
CommandManager
.InvalidateRequerySuggested();
3600
CommandManager
.InvalidateRequerySuggested();
3610
CommandManager
.InvalidateRequerySuggested();
4294
CommandManager
.InvalidateRequerySuggested();
4564
CommandManager
.InvalidateRequerySuggested();
5420
CommandManager
.InvalidateRequerySuggested();
8241
CommandManager
.InvalidateRequerySuggested();
src\Framework\System\Windows\Controls\DataGridCell.cs (1)
231
CommandManager
.InvalidateRequerySuggested();
src\Framework\System\Windows\Controls\DocumentViewer.cs (3)
1734
CommandManager
.RegisterClassInputBinding(typeof(DocumentViewer),
1744
CommandManager
.RegisterClassInputBinding(typeof(DocumentViewer),
1754
CommandManager
.RegisterClassInputBinding(typeof(DocumentViewer),
src\Framework\System\Windows\Controls\FlowDocumentReader.cs (8)
677
CommandManager
.InvalidateRequerySuggested();
1177
CommandManager
.AddPreviewCanExecuteHandler(_pageViewer, new CanExecuteRoutedEventHandler(PreviewCanExecuteRoutedEventHandler));
1187
CommandManager
.AddPreviewCanExecuteHandler(_twoPageViewer, new CanExecuteRoutedEventHandler(PreviewCanExecuteRoutedEventHandler));
1197
CommandManager
.AddPreviewCanExecuteHandler(_scrollViewer, new CanExecuteRoutedEventHandler(PreviewCanExecuteRoutedEventHandler));
1255
CommandManager
.InvalidateRequerySuggested();
1724
CommandManager
.InvalidateRequerySuggested();
1736
CommandManager
.InvalidateRequerySuggested();
1749
CommandManager
.InvalidateRequerySuggested();
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (5)
571
CommandManager
.InvalidateRequerySuggested();
580
CommandManager
.AddPreviewCanExecuteHandler(_contentHost, new CanExecuteRoutedEventHandler(PreviewCanExecuteRoutedEventHandler));
1079
CommandManager
.RemovePreviewCanExecuteHandler(_contentHost, new CanExecuteRoutedEventHandler(PreviewCanExecuteRoutedEventHandler));
1093
CommandManager
.InvalidateRequerySuggested();
1637
CommandManager
.InvalidateRequerySuggested();
src\Framework\System\Windows\Controls\MenuItem.cs (1)
612
CommandManager
.InvalidateRequerySuggested(); // Should post an idle queue item to update IsEnabled on commands
src\Framework\System\Windows\Controls\Primitives\DocumentViewerBase.cs (4)
606
CommandManager
.InvalidateRequerySuggested();
1281
CommandManager
.InvalidateRequerySuggested();
1455
CommandManager
.InvalidateRequerySuggested();
1632
CommandManager
.InvalidateRequerySuggested();
src\Framework\System\Windows\Controls\Primitives\Track.cs (2)
189
CommandManager
.InvalidateRequerySuggested(); // Should post an idle queue item to update IsEnabled on button
230
CommandManager
.InvalidateRequerySuggested(); // Should post an idle queue item to update IsEnabled on button
src\Framework\System\Windows\Controls\SinglePageViewer.cs (14)
685
CommandManager
.InvalidateRequerySuggested();
692
CommandManager
.AddPreviewCanExecuteHandler(this, new CanExecuteRoutedEventHandler(PreviewCanExecuteRoutedEventHandler));
1113
CommandManager
.RemovePreviewCanExecuteHandler(this, new CanExecuteRoutedEventHandler(PreviewCanExecuteRoutedEventHandler));
1125
CommandManager
.InvalidateRequerySuggested();
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)));
src\Framework\System\Windows\Navigation\NavigationWindow.cs (5)
187
CommandManager
.RegisterClassCommandBinding(
194
CommandManager
.RegisterClassCommandBinding(
201
CommandManager
.RegisterClassCommandBinding(
205
CommandManager
.RegisterClassCommandBinding(
212
CommandManager
.RegisterClassCommandBinding(
src\Framework\System\Windows\Window.cs (1)
3642
CommandManager
.RegisterClassCommandBinding(typeof(Window), binding);