136 references to ApplicationCommands
Microsoft.VisualStudio.LanguageServices (1)
StackTraceExplorer\StackTraceExplorerToolWindow.cs (1)
47
dockPanel.CommandBindings.Add(new CommandBinding(
ApplicationCommands
.Paste, (s, e) =>
PresentationCore (19)
System\Windows\Input\Command\ApplicationCommands.cs (1)
436
typeof(
ApplicationCommands
), (byte)idCommand);
System\Windows\Input\Command\CommandDevice.cs (13)
197
appCommand =
ApplicationCommands
.Help;
200
appCommand =
ApplicationCommands
.Find;
203
appCommand =
ApplicationCommands
.New;
206
appCommand =
ApplicationCommands
.Open;
209
appCommand =
ApplicationCommands
.Close;
212
appCommand =
ApplicationCommands
.Save;
215
appCommand =
ApplicationCommands
.Print;
218
appCommand =
ApplicationCommands
.Undo;
221
appCommand =
ApplicationCommands
.Redo;
224
appCommand =
ApplicationCommands
.Copy;
227
appCommand =
ApplicationCommands
.Cut;
230
appCommand =
ApplicationCommands
.Paste;
242
appCommand =
ApplicationCommands
.CorrectionList;
System\Windows\Input\Command\CommandManager.cs (1)
387
if (command != null && command !=
ApplicationCommands
.NotACommand)
System\Windows\Input\Command\RoutedCommand.cs (2)
245
if(OwnerType == typeof(
ApplicationCommands
))
247
return
ApplicationCommands
.LoadDefaultGestureFromResource(_commandId);
System\Windows\Input\Command\RoutedUICommand.cs (2)
89
if(OwnerType == typeof(
ApplicationCommands
))
91
return
ApplicationCommands
.GetUIText(CommandId);
PresentationFramework (101)
MS\Internal\Documents\DocumentGridContextMenu.cs (3)
147
SetMenuProperties(new EditorMenuItem(), dg,
ApplicationCommands
.Copy); // Copy will be marked as user initiated
150
SetMenuProperties(new MenuItem(), dg,
ApplicationCommands
.SelectAll);
184
SetMenuProperties(new MenuItem(), dg,
ApplicationCommands
.Print);
System\Windows\Controls\DataGrid.cs (3)
70
CommandManager.RegisterClassCommandBinding(typeof(DataGrid), new CommandBinding(
ApplicationCommands
.Copy, new ExecutedRoutedEventHandler(OnExecutedCopy), new CanExecuteRoutedEventHandler(OnCanExecuteCopy)));
2077
return
ApplicationCommands
.Delete;
4329
return
ApplicationCommands
.SelectAll;
System\Windows\Controls\DocumentViewer.cs (3)
1540
ApplicationCommands
.Find,
1760
else if (args.Command ==
ApplicationCommands
.Find)
1870
else if (args.Command ==
ApplicationCommands
.Find)
System\Windows\Controls\FlowDocumentReader.cs (12)
1336
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.Find,
1340
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.Print,
1344
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.CancelPrint,
1407
else if (args.Command ==
ApplicationCommands
.Find)
1411
else if (args.Command ==
ApplicationCommands
.Print)
1415
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1426
args.CanExecute = (args.Command ==
ApplicationCommands
.CancelPrint);
1445
else if (args.Command ==
ApplicationCommands
.Find)
1449
else if (args.Command ==
ApplicationCommands
.Print)
1453
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1606
if (args.Command ==
ApplicationCommands
.Find)
1612
else if (args.Command ==
ApplicationCommands
.Print)
System\Windows\Controls\FlowDocumentScrollViewer.cs (10)
1345
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.Find,
1349
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.Print,
1353
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.CancelPrint,
1416
if (args.Command ==
ApplicationCommands
.Find)
1420
else if (args.Command ==
ApplicationCommands
.Print)
1424
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1435
args.CanExecute = (args.Command ==
ApplicationCommands
.CancelPrint);
1453
if (args.Command ==
ApplicationCommands
.Find)
1457
else if (args.Command ==
ApplicationCommands
.Print)
1461
else if (args.Command ==
ApplicationCommands
.CancelPrint)
System\Windows\Controls\InkCanvas.cs (18)
74
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Delete,
77
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.SelectAll,
2470
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Cut,
2473
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Copy,
2482
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Paste,
2710
if ( command ==
ApplicationCommands
.Delete )
2714
else if ( command ==
ApplicationCommands
.Cut )
2718
else if ( command ==
ApplicationCommands
.Copy )
2722
else if ( command ==
ApplicationCommands
.SelectAll )
2742
else if ( command ==
ApplicationCommands
.Paste )
2786
if ( command ==
ApplicationCommands
.Delete
2787
|| command ==
ApplicationCommands
.Cut
2788
|| command ==
ApplicationCommands
.Copy
2793
else if ( command ==
ApplicationCommands
.Paste )
2808
else if ( command ==
ApplicationCommands
.SelectAll )
2824
if ( command ==
ApplicationCommands
.Cut || command ==
ApplicationCommands
.Copy
2825
|| command ==
ApplicationCommands
.Paste )
System\Windows\Controls\PasswordBox.cs (1)
108
RoutedCommand command =
ApplicationCommands
.Paste;
System\Windows\Controls\Primitives\DocumentViewerBase.cs (6)
1469
CommandHelpers.RegisterCommandHandler(typeof(DocumentViewerBase),
ApplicationCommands
.Print,
1473
CommandHelpers.RegisterCommandHandler(typeof(DocumentViewerBase),
ApplicationCommands
.CancelPrint,
1495
if (args.Command ==
ApplicationCommands
.Print)
1500
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1562
else if (args.Command ==
ApplicationCommands
.Print)
1566
else if (args.Command ==
ApplicationCommands
.CancelPrint)
System\Windows\Controls\SinglePageViewer.cs (4)
1260
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentPageViewer),
ApplicationCommands
.Find,
1298
if (args.Command ==
ApplicationCommands
.Find)
1330
else if (args.Command ==
ApplicationCommands
.Find)
1352
if (args.Command !=
ApplicationCommands
.CancelPrint)
System\Windows\Documents\RubberbandSelector.cs (2)
69
CommandBinding binding = new CommandBinding(
ApplicationCommands
.Copy);
98
if (binding.Command ==
ApplicationCommands
.Copy)
System\windows\Documents\TextEditor.cs (2)
396
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Undo, new ExecutedRoutedEventHandler(OnUndo), new CanExecuteRoutedEventHandler(OnQueryStatusUndo), KeyGesture.CreateFromResourceStrings(KeyUndo, SR.KeyUndoDisplayString), KeyGesture.CreateFromResourceStrings(KeyAltUndo, SR.KeyAltUndoDisplayString));
397
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Redo, new ExecutedRoutedEventHandler(OnRedo), new CanExecuteRoutedEventHandler(OnQueryStatusRedo), KeyGesture.CreateFromResourceStrings(KeyRedo, nameof(SR.KeyRedoDisplayString)));
System\windows\Documents\TextEditorContextMenu.cs (4)
599
Command =
ApplicationCommands
.CorrectionList
618
Command =
ApplicationCommands
.Cut
626
Command =
ApplicationCommands
.Copy
634
Command =
ApplicationCommands
.Paste
System\windows\Documents\TextEditorCopyPaste.cs (3)
37
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Copy, new ExecutedRoutedEventHandler(OnCopy), new CanExecuteRoutedEventHandler(OnQueryStatusCopy), KeyGesture.CreateFromResourceStrings(KeyCopy, SR.KeyCopyDisplayString), KeyGesture.CreateFromResourceStrings(KeyCtrlInsert, SR.KeyCtrlInsertDisplayString));
44
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Cut, new ExecutedRoutedEventHandler(OnCut), new CanExecuteRoutedEventHandler(OnQueryStatusCut), KeyGesture.CreateFromResourceStrings(KeyCut, SR.KeyCutDisplayString), KeyGesture.CreateFromResourceStrings(KeyShiftDelete, SR.KeyShiftDeleteDisplayString));
49
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Paste, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler, inputGesture);
System\windows\Documents\TextEditorSelection.cs (1)
41
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.SelectAll, new ExecutedRoutedEventHandler(OnSelectAll), queryStatusKeyboardSelectionHandler, KeySelectAll, nameof(SR.KeySelectAllDisplayString));
System\windows\Documents\TextEditorTyping.cs (1)
69
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.CorrectionList , new ExecutedRoutedEventHandler(OnCorrectionList) , new CanExecuteRoutedEventHandler(OnQueryStatusCorrectionList) , nameof(SR.KeyCorrectionList), nameof(SR.KeyCorrectionListDisplayString) );
System\Windows\FrameworkCompatibilityPreferences.cs (2)
359
/// the application would take control of handling <see cref="System.Windows.Input.
ApplicationCommands
.Cut"/>
360
/// and <see cref="System.Windows.Input.
ApplicationCommands
.Copy"/> RoutedUICommands through a
System\Windows\Input\Command\CommandConverter.cs (26)
197
if (commandType == typeof(
ApplicationCommands
) ||
301
if (ownerType == typeof(
ApplicationCommands
) || ((null == knownCommand) && searchAll))
306
knownCommand =
ApplicationCommands
.Cut;
309
knownCommand =
ApplicationCommands
.Copy;
312
knownCommand =
ApplicationCommands
.Paste;
315
knownCommand =
ApplicationCommands
.Undo;
318
knownCommand =
ApplicationCommands
.Redo;
321
knownCommand =
ApplicationCommands
.Delete;
324
knownCommand =
ApplicationCommands
.Find;
327
knownCommand =
ApplicationCommands
.Replace;
330
knownCommand =
ApplicationCommands
.Help;
333
knownCommand =
ApplicationCommands
.New;
336
knownCommand =
ApplicationCommands
.Open;
339
knownCommand =
ApplicationCommands
.Save;
342
knownCommand =
ApplicationCommands
.SaveAs;
345
knownCommand =
ApplicationCommands
.Close;
348
knownCommand =
ApplicationCommands
.Print;
351
knownCommand =
ApplicationCommands
.CancelPrint;
354
knownCommand =
ApplicationCommands
.PrintPreview;
357
knownCommand =
ApplicationCommands
.Properties;
360
knownCommand =
ApplicationCommands
.ContextMenu;
363
knownCommand =
ApplicationCommands
.CorrectionList;
366
knownCommand =
ApplicationCommands
.SelectAll;
369
knownCommand =
ApplicationCommands
.Stop;
372
knownCommand =
ApplicationCommands
.NotACommand;
743
VerifyCommandDoesntExist( typeof(
ApplicationCommands
), localName );
PresentationUI (15)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (15)
1315
if (e.Command.Equals(
ApplicationCommands
.Save))
1328
else if (e.Command.Equals(
ApplicationCommands
.SaveAs))
1334
else if (e.Command.Equals(
ApplicationCommands
.Properties))
1370
if (e.Command.Equals(
ApplicationCommands
.Save))
1385
else if (e.Command.Equals(
ApplicationCommands
.SaveAs))
1393
else if (e.Command.Equals(
ApplicationCommands
.Properties))
2061
BindCommand(
ApplicationCommands
.Save, executeHandler, queryEnabledHandler);
2066
BindCommand(
ApplicationCommands
.SaveAs, executeHandler, queryEnabledHandler);
2071
BindCommand(
ApplicationCommands
.Properties, executeHandler, queryEnabledHandler);
2152
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.Print, RightsManagementPolicy.AllowPrint));
2153
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.PrintPreview, RightsManagementPolicy.AllowPrint));
2156
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.Copy, RightsManagementPolicy.AllowCopy));
2157
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.Cut, RightsManagementPolicy.AllowCopy));
2158
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.Save, RightsManagementPolicy.AllowCopy));
2159
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.SaveAs, RightsManagementPolicy.AllowCopy));