55 instantiations of CommandBinding
PresentationFramework (40)
src\Framework\MS\Internal\AppModel\XappLauncher.cs (2)
116MainWindow.CommandBindings.Add(new CommandBinding(NavigationCommands.BrowseStop, new ExecutedRoutedEventHandler(OnCommandStop))); 117MainWindow.CommandBindings.Add(new CommandBinding(NavigationCommands.Refresh, new ExecutedRoutedEventHandler(OnCommandRefresh)));
src\Framework\MS\Internal\Commands\CommandHelpers.cs (1)
110CommandManager.RegisterClassCommandBinding(controlType, new CommandBinding(command, executedRoutedEventHandler, canExecuteRoutedEventHandler));
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 (6)
62CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(BeginEditCommand, new ExecutedRoutedEventHandler(OnExecutedBeginEdit), new CanExecuteRoutedEventHandler(OnCanExecuteBeginEdit))); 64CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(CommitEditCommand, new ExecutedRoutedEventHandler(OnExecutedCommitEdit), new CanExecuteRoutedEventHandler(OnCanExecuteCommitEdit))); 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)));
src\Framework\System\Windows\Controls\Frame.cs (5)
1382AddCommandBinding(new CommandBinding(NavigationCommands.BrowseBack, OnGoBack, OnQueryGoBack)); 1383AddCommandBinding(new CommandBinding(NavigationCommands.BrowseForward, OnGoForward, OnQueryGoForward)); 1384AddCommandBinding(new CommandBinding(NavigationCommands.NavigateJournal, OnNavigateJournal)); 1385AddCommandBinding(new CommandBinding(NavigationCommands.Refresh, OnRefresh, OnQueryRefresh)); 1386AddCommandBinding(new CommandBinding(NavigationCommands.BrowseStop, OnBrowseStop));
src\Framework\System\Windows\Documents\RubberbandSelector.cs (1)
94CommandBinding binding = new CommandBinding(ApplicationCommands.Copy);
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
11536bamlType.DefaultConstructor = delegate() { return new System.Windows.Input.CommandBinding(); };
src\Framework\System\Windows\Navigation\NavigationWindow.cs (5)
189new CommandBinding( 196new CommandBinding( 203new CommandBinding(NavigationCommands.NavigateJournal, new ExecutedRoutedEventHandler(OnNavigateJournal))); 207new CommandBinding( 214new CommandBinding(
src\Framework\System\Windows\Window.cs (1)
3640CommandBinding binding = new CommandBinding(DialogCancelCommand);
System.Activities.Core.Presentation (2)
System\ServiceModel\Activities\Presentation\CorrelationDataDesigner.xaml.cs (1)
71this.CommandBindings.Add(new CommandBinding(AddNewDataCommand, OnAddNewDataExecuted));
System\ServiceModel\Activities\Presentation\CorrelationInitializerDesigner.xaml.cs (1)
53this.CommandBindings.Add(new CommandBinding(AddNewInitializerCommand, this.OnAddNewInitializerExecuted));
System.Activities.Presentation (13)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CategoryList.cs (1)
88this.CommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.FinishEditing, OnFinishEditing));
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\ValueEditors\StringEditor.cs (1)
41this.CommandBindings.Add(new CommandBinding( DesignerView.CommitCommand, OnDesignerViewCommitExecute));
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyValueDialogHost.cs (1)
50dialogRoot.CommandBindings.Add(new CommandBinding(PropertyContainer.OpenDialogWindow, dialogHost.OnOpenDialogWindow, dialogHost.OnCanOpenDialogWindow));
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyValueEditorCommandHandler.cs (7)
92_activeCommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.ShowInlineEditor, OnShowInlineEditor)); 93_activeCommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.ShowExtendedPopupEditor, OnShowExtendedPopupEditor)); 94_activeCommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.ShowExtendedPinnedEditor, OnShowExtendedPinnedEditor)); 95_activeCommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.ShowDialogEditor, OnShowDialogEditor)); 137_activeCommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.BeginTransaction, OnBeginTransaction)); 138_activeCommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.CommitTransaction, OnCommitTransaction)); 139_activeCommandBindings.Add(new CommandBinding(PropertyValueEditorCommands.AbortTransaction, OnAbortTransaction));
System.Activities.Presentation\System\Activities\Presentation\DialogWindow.cs (1)
49this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Help, new ExecutedRoutedEventHandler(OnHelpExecuted)));
System.Activities.Presentation\System\Activities\Presentation\ErrorReporting.cs (1)
160var copyBinding = new CommandBinding(ApplicationCommands.Copy);
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (1)
317var cb = new CommandBinding(PropertyValueEditorCommands.ShowDialogEditor, this.OnShowPropertyValueEditor, this.OnCanShowPropertyValueEditor);
63 references to CommandBinding
PresentationCore (35)
Core\CSharp\System\Windows\Input\Command\CommandBindingCollection.cs (25)
98return this.Contains(key as CommandBinding) ; 108CommandBinding commandBinding = value as CommandBinding; 119this.Insert(index, value as CommandBinding); 128return this.Add(commandBinding as CommandBinding); 137this.Remove(commandBinding as CommandBinding); 151CommandBinding commandBinding = value as CommandBinding; 162public CommandBinding this[int index] 181public int Add(CommandBinding commandBinding) 186_innerCBList = new System.Collections.Generic.List<CommandBinding>(1); 211_innerCBList = new System.Collections.Generic.List<CommandBinding>(collection.Count); 216CommandBinding cmdBinding = collectionEnum.Current as CommandBinding; 234public void Insert(int index, CommandBinding commandBinding) 251public void Remove(CommandBinding commandBinding) 337public int IndexOf(CommandBinding value) 347public bool Contains(CommandBinding commandBinding) 361public void CopyTo(CommandBinding[] commandBindings, int index) 377System.Collections.Generic.List<CommandBinding> list = new System.Collections.Generic.List<CommandBinding>(0); 390CommandBinding commandBinding = this[i]; 408internal CommandBinding FindMatch(ICommand command, ref int index) 412CommandBinding commandBinding = this[index++]; 429private System.Collections.Generic.List<CommandBinding> _innerCBList;
Core\CSharp\System\Windows\Input\Command\CommandManager.cs (10)
277public static void RegisterClassCommandBinding(Type type, CommandBinding commandBinding) 543private static bool CanExecuteCommandBinding(object sender, CanExecuteRoutedEventArgs e, CommandBinding commandBinding) 583private static bool ExecuteCommandBinding(object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding) 660Tuple<Type, CommandBinding> tuple = null; // zero or one binding 661List<Tuple<Type, CommandBinding>> list = null; // more than one 675CommandBinding commandBinding = classCommandBindings.FindMatch(command, ref index); 680tuple = new Tuple<Type, CommandBinding>(classType, commandBinding); 686list = new List<Tuple<Type, CommandBinding>>(); 689list.Add(new Tuple<Type, CommandBinding>(classType, commandBinding)); 744CommandBinding commandBinding = commandBindings.FindMatch(command, ref index);
PresentationFramework (13)
src\Framework\System\Windows\Controls\Frame.cs (4)
1402foreach (CommandBinding cb in _commandBindings) 1411private void AddCommandBinding(CommandBinding b) 1419_commandBindings = new List<CommandBinding>(6); 1441private List<CommandBinding> _commandBindings;
src\Framework\System\Windows\Documents\RubberbandSelector.cs (2)
94CommandBinding binding = new CommandBinding(ApplicationCommands.Copy); 121foreach (CommandBinding binding in commandBindings)
src\Framework\System\Windows\FrameworkCompatibilityPreferences.cs (1)
403/// <see cref="System.Windows.Input.CommandBinding"/>, and apply that binding to all TextBoxBase
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (4)
6944Type type = typeof(System.Windows.Input.CommandBinding); 6946this.GetXamlType(typeof(System.Windows.Input.CommandBinding)), // DeclaringType 6953bamlMember.SetDelegate = delegate(object target, object value) { ((System.Windows.Input.CommandBinding)target).Command = (System.Windows.Input.ICommand)value; }; 6954bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Input.CommandBinding)target).Command; };
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
11534typeof(System.Windows.Input.CommandBinding),
src\Framework\System\Windows\Window.cs (1)
3640CommandBinding binding = new CommandBinding(DialogCancelCommand);
System.Activities.Presentation (15)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyValueEditorCommandHandler.cs (4)
29private List<CommandBinding> _activeCommandBindings = new List<CommandBinding>(); 40foreach (CommandBinding binding in _activeCommandBindings) 53foreach (CommandBinding binding in _activeCommandBindings)
System.Activities.Presentation\System\Activities\Presentation\ErrorReporting.cs (1)
160var copyBinding = new CommandBinding(ApplicationCommands.Copy);
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (2)
312.Cast<CommandBinding>() 317var cb = new CommandBinding(PropertyValueEditorCommands.ShowDialogEditor, this.OnShowPropertyValueEditor, this.OnCanShowPropertyValueEditor);
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (8)
133HashSet<CommandBinding> ignoreCommands = new HashSet<CommandBinding>(); 165foreach (CommandBinding binding in this.CommandBindings) 184foreach (CommandBinding binding in this.CommandBindings) 203foreach (CommandBinding binding in this.CommandBindings) 297foreach (CommandBinding binding in this.ignoreCommands) 305foreach (CommandBinding cb in this.CommandBindings) 317foreach (CommandBinding cb in this.ignoreCommands)