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