63 instantiations of CommandBinding
Microsoft.VisualStudio.LanguageServices (8)
GenerateType\GenerateTypeDialog.xaml.cs (5)
48CommandBindings.Add(new CommandBinding( 55CommandBindings.Add(new CommandBinding( 62CommandBindings.Add(new CommandBinding( 69CommandBindings.Add(new CommandBinding( 76CommandBindings.Add(new CommandBinding(
PickMembers\PickMembersDialog.xaml.cs (2)
47CommandBindings.Add(new CommandBinding( 54CommandBindings.Add(new CommandBinding(
StackTraceExplorer\StackTraceExplorerToolWindow.cs (1)
47dockPanel.CommandBindings.Add(new CommandBinding(ApplicationCommands.Paste, (s, e) =>
PresentationFramework (38)
MS\Internal\Commands\CommandHelpers.cs (1)
107CommandManager.RegisterClassCommandBinding(controlType, new CommandBinding(command, executedRoutedEventHandler, canExecuteRoutedEventHandler));
System\Windows\Annotations\AnnotationService.cs (18)
59CommandManager.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(CreateHighlightCommand, AnnotationHelper.OnCreateHighlightCommand, AnnotationHelper.OnQueryCreateHighlightCommand)); 61CommandManager.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(CreateTextStickyNoteCommand, AnnotationHelper.OnCreateTextStickyNoteCommand, AnnotationHelper.OnQueryCreateTextStickyNoteCommand)); 63CommandManager.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(CreateInkStickyNoteCommand, AnnotationHelper.OnCreateInkStickyNoteCommand, AnnotationHelper.OnQueryCreateInkStickyNoteCommand)); 65CommandManager.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(ClearHighlightsCommand, AnnotationHelper.OnClearHighlightsCommand, AnnotationHelper.OnQueryClearHighlightsCommand)); 67CommandManager.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(DeleteStickyNotesCommand, AnnotationHelper.OnDeleteStickyNotesCommand, AnnotationHelper.OnQueryDeleteStickyNotesCommand)); 69CommandManager.RegisterClassCommandBinding(typeof(DocumentViewerBase), new CommandBinding(DeleteAnnotationsCommand, AnnotationHelper.OnDeleteAnnotationsCommand, AnnotationHelper.OnQueryDeleteAnnotationsCommand)); 71CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(CreateHighlightCommand, AnnotationHelper.OnCreateHighlightCommand, AnnotationHelper.OnQueryCreateHighlightCommand)); 73CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(CreateTextStickyNoteCommand, AnnotationHelper.OnCreateTextStickyNoteCommand, AnnotationHelper.OnQueryCreateTextStickyNoteCommand)); 75CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(CreateInkStickyNoteCommand, AnnotationHelper.OnCreateInkStickyNoteCommand, AnnotationHelper.OnQueryCreateInkStickyNoteCommand)); 77CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(ClearHighlightsCommand, AnnotationHelper.OnClearHighlightsCommand, AnnotationHelper.OnQueryClearHighlightsCommand)); 79CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(DeleteStickyNotesCommand, AnnotationHelper.OnDeleteStickyNotesCommand, AnnotationHelper.OnQueryDeleteStickyNotesCommand)); 81CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentScrollViewer), new CommandBinding(DeleteAnnotationsCommand, AnnotationHelper.OnDeleteAnnotationsCommand, AnnotationHelper.OnQueryDeleteAnnotationsCommand)); 83CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(CreateHighlightCommand, AnnotationHelper.OnCreateHighlightCommand, AnnotationHelper.OnQueryCreateHighlightCommand)); 85CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(CreateTextStickyNoteCommand, AnnotationHelper.OnCreateTextStickyNoteCommand, AnnotationHelper.OnQueryCreateTextStickyNoteCommand)); 87CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(CreateInkStickyNoteCommand, AnnotationHelper.OnCreateInkStickyNoteCommand, AnnotationHelper.OnQueryCreateInkStickyNoteCommand)); 89CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(ClearHighlightsCommand, AnnotationHelper.OnClearHighlightsCommand, AnnotationHelper.OnQueryClearHighlightsCommand)); 91CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(DeleteStickyNotesCommand, AnnotationHelper.OnDeleteStickyNotesCommand, AnnotationHelper.OnQueryDeleteStickyNotesCommand)); 93CommandManager.RegisterClassCommandBinding(typeof(FlowDocumentReader), new CommandBinding(DeleteAnnotationsCommand, AnnotationHelper.OnDeleteAnnotationsCommand, AnnotationHelper.OnQueryDeleteAnnotationsCommand));
System\Windows\Controls\DataGrid.cs (6)
61CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(BeginEditCommand, new ExecutedRoutedEventHandler(OnExecutedBeginEdit), new CanExecuteRoutedEventHandler(OnCanExecuteBeginEdit))); 63CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(CommitEditCommand, new ExecutedRoutedEventHandler(OnExecutedCommitEdit), new CanExecuteRoutedEventHandler(OnCanExecuteCommitEdit))); 66CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(CancelEditCommand, new ExecutedRoutedEventHandler(OnExecutedCancelEdit), new CanExecuteRoutedEventHandler(OnCanExecuteCancelEdit))); 68CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(SelectAllCommand, new ExecutedRoutedEventHandler(OnExecutedSelectAll), new CanExecuteRoutedEventHandler(OnCanExecuteSelectAll))); 70CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(DeleteCommand, new ExecutedRoutedEventHandler(OnExecutedDelete), new CanExecuteRoutedEventHandler(OnCanExecuteDelete))); 73CommandManager.RegisterClassCommandBinding(typeof(DataGrid), new CommandBinding(ApplicationCommands.Copy, new ExecutedRoutedEventHandler(OnExecutedCopy), new CanExecuteRoutedEventHandler(OnCanExecuteCopy)));
System\Windows\Controls\Frame.cs (5)
1362AddCommandBinding(new CommandBinding(NavigationCommands.BrowseBack, OnGoBack, OnQueryGoBack)); 1363AddCommandBinding(new CommandBinding(NavigationCommands.BrowseForward, OnGoForward, OnQueryGoForward)); 1364AddCommandBinding(new CommandBinding(NavigationCommands.NavigateJournal, OnNavigateJournal)); 1365AddCommandBinding(new CommandBinding(NavigationCommands.Refresh, OnRefresh, OnQueryRefresh)); 1366AddCommandBinding(new CommandBinding(NavigationCommands.BrowseStop, OnBrowseStop));
System\Windows\Documents\RubberbandSelector.cs (1)
79CommandBinding binding = new CommandBinding(ApplicationCommands.Copy);
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
11540bamlType.DefaultConstructor = delegate() { return new System.Windows.Input.CommandBinding(); };
System\Windows\Navigation\NavigationWindow.cs (5)
176new CommandBinding( 183new CommandBinding( 190new CommandBinding(NavigationCommands.NavigateJournal, new ExecutedRoutedEventHandler(OnNavigateJournal))); 194new CommandBinding( 201new CommandBinding(
System\Windows\Window.cs (1)
3589CommandBinding binding = new CommandBinding(DialogCancelCommand);
PresentationUI (5)
InstallationError.xaml.cs (1)
25new CommandBinding(NavigationCommands.Refresh,
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (1)
2134new CommandBinding(command, executeHandler, queryEnabledHandler));
TenFeetInstallationError.xaml.cs (1)
32new CommandBinding(NavigationCommands.Refresh,
TenFeetInstallationProgress.xaml.cs (2)
33new CommandBinding(NavigationCommands.Refresh, 38new CommandBinding(NavigationCommands.BrowseStop,
System.Windows.Controls.Ribbon (12)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (6)
108new CommandBinding(RibbonCommands.AddToQuickAccessToolBarCommand, AddToQATExecuted, AddToQATCanExecute)); 110new CommandBinding(RibbonCommands.MaximizeRibbonCommand, MaximizeRibbonExecuted, MaximizeRibbonCanExecute)); 112new CommandBinding(RibbonCommands.MinimizeRibbonCommand, MinimizeRibbonExecuted, MinimizeRibbonCanExecute)); 114new CommandBinding(RibbonCommands.RemoveFromQuickAccessToolBarCommand, RemoveFromQATExecuted, RemoveFromQATCanExecute)); 116new CommandBinding(RibbonCommands.ShowQuickAccessToolBarAboveRibbonCommand, ShowQATAboveExecuted, ShowQATAboveCanExecute)); 118new CommandBinding(RibbonCommands.ShowQuickAccessToolBarBelowRibbonCommand, ShowQATBelowExecuted, ShowQATBelowCanExecute));
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (1)
78CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(FilterCommand, FilterExecuted, FilterCanExecute));
Microsoft\Windows\Controls\Ribbon\RibbonWindow.cs (5)
60CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(_minimizeWindowCommand, MinimizeWindowExecuted, MinimizeWindowCanExecute)); 61CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(_maximizeWindowCommand, MaximizeWindowExecuted, MaximizeWindowCanExecute)); 62CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(_restoreWindowCommand, RestoreWindowExecuted, RestoreWindowCanExecute)); 63CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(_closeWindowCommand, CloseWindowExecuted, CloseWindowCanExecute)); 64CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(_showSystemMenuCommand, SystemMenuExecuted, SystemMenuCanExecute));
58 references to CommandBinding
Microsoft.VisualStudio.LanguageServices (13)
artifacts\obj\Microsoft.VisualStudio.LanguageServices\Release\net472\ChangeSignature\ChangeSignatureDialog.g.cs (8)
263((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveUp_Click_FocusRow); 271((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveUp_Click); 279((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveDown_Click_FocusRow); 287((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveDown_Click); 295((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.ToggleRemovedState); 318((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveSelectionUp_Click); 326((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveSelectionDown_Click); 334((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OK_Click);
artifacts\obj\Microsoft.VisualStudio.LanguageServices\Release\net472\PickMembers\PickMembersDialog.g.cs (2)
160((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveUp_Click); 168((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveDown_Click);
artifacts\obj\Microsoft.VisualStudio.LanguageServices\Release\net472\StackTraceExplorer\StackTraceExplorer.g.cs (3)
77((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed); 85((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed); 109((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);
PresentationCore (32)
System\Windows\Input\Command\CommandBindingCollection.cs (22)
91return Contains(key as CommandBinding) ; 101return ((value is CommandBinding commandBinding) ? IndexOf(commandBinding) : -1); 111Insert(index, value as CommandBinding); 120return Add(commandBinding as CommandBinding); 129Remove(commandBinding as CommandBinding); 143if (value is not CommandBinding commandBinding) 153public CommandBinding this[int index] 172public int Add(CommandBinding commandBinding) 176_innerCBList ??= new Collections.Generic.List<CommandBinding>(1); 198_innerCBList ??= new System.Collections.Generic.List<CommandBinding>(collection.Count); 203if (collectionEnum.Current is CommandBinding cmdBinding) 219public void Insert(int index, CommandBinding commandBinding) 235public void Remove(CommandBinding commandBinding) 314public int IndexOf(CommandBinding value) 324public bool Contains(CommandBinding commandBinding) 338public void CopyTo(CommandBinding[] commandBindings, int index) 353System.Collections.Generic.List<CommandBinding> list = new System.Collections.Generic.List<CommandBinding>(0); 366CommandBinding commandBinding = this[i]; 378internal CommandBinding FindMatch(ICommand command, ref int index) 382CommandBinding commandBinding = this[index++]; 399private Collections.Generic.List<CommandBinding> _innerCBList;
System\Windows\Input\Command\CommandManager.cs (10)
222public static void RegisterClassCommandBinding(Type type, CommandBinding commandBinding) 475private static bool CanExecuteCommandBinding(object sender, CanExecuteRoutedEventArgs e, CommandBinding commandBinding) 510private static bool ExecuteCommandBinding(object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding) 561ValueTuple<Type, CommandBinding>? tuple = default; // zero or one binding 562List<ValueTuple<Type, CommandBinding>> list = default; // more than one 575CommandBinding commandBinding = classCommandBindings.FindMatch(command, ref index); 587list ??= new List<ValueTuple<Type, CommandBinding>>(8) 592list.Add(new ValueTuple<Type, CommandBinding>(classType, commandBinding)); 640CommandBinding commandBinding = commandBindings.FindMatch(command, ref index); 648private static bool HandleCommandBinding(object sender, RoutedEventArgs e, CommandBinding commandBinding, bool execute)
PresentationFramework (13)
System\Windows\Controls\Frame.cs (4)
1382foreach (CommandBinding cb in _commandBindings) 1391private void AddCommandBinding(CommandBinding b) 1399_commandBindings = new List<CommandBinding>(6); 1421private List<CommandBinding> _commandBindings;
System\Windows\Documents\RubberbandSelector.cs (2)
79CommandBinding binding = new CommandBinding(ApplicationCommands.Copy); 106foreach (CommandBinding binding in commandBindings)
System\Windows\FrameworkCompatibilityPreferences.cs (1)
364/// <see cref="System.Windows.Input.CommandBinding"/>, and apply that binding to all TextBoxBase
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (4)
6986Type type = typeof(System.Windows.Input.CommandBinding); 6988this.GetXamlType(typeof(System.Windows.Input.CommandBinding)), // DeclaringType 6995bamlMember.SetDelegate = delegate(object target, object value) { ((System.Windows.Input.CommandBinding)target).Command = (System.Windows.Input.ICommand)value; }; 6996bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Input.CommandBinding)target).Command; };
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
11538typeof(System.Windows.Input.CommandBinding),
System\Windows\Window.cs (1)
3589CommandBinding binding = new CommandBinding(DialogCancelCommand);