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