148 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)
449
typeof(
ApplicationCommands
), (byte)idCommand);
System\Windows\Input\Command\CommandDevice.cs (13)
202
appCommand =
ApplicationCommands
.Help;
205
appCommand =
ApplicationCommands
.Find;
208
appCommand =
ApplicationCommands
.New;
211
appCommand =
ApplicationCommands
.Open;
214
appCommand =
ApplicationCommands
.Close;
217
appCommand =
ApplicationCommands
.Save;
220
appCommand =
ApplicationCommands
.Print;
223
appCommand =
ApplicationCommands
.Undo;
226
appCommand =
ApplicationCommands
.Redo;
229
appCommand =
ApplicationCommands
.Copy;
232
appCommand =
ApplicationCommands
.Cut;
235
appCommand =
ApplicationCommands
.Paste;
247
appCommand =
ApplicationCommands
.CorrectionList;
System\Windows\Input\Command\CommandManager.cs (1)
398
if (command != null && command !=
ApplicationCommands
.NotACommand)
System\Windows\Input\Command\RoutedCommand.cs (2)
256
if(OwnerType == typeof(
ApplicationCommands
))
258
return
ApplicationCommands
.LoadDefaultGestureFromResource(_commandId);
System\Windows\Input\Command\RoutedUICommand.cs (2)
93
if(OwnerType == typeof(
ApplicationCommands
))
95
return
ApplicationCommands
.GetUIText(CommandId);
PresentationFramework (113)
MS\Internal\AppModel\OleCmdHelper.cs (12)
189
_oleCmdMappingTable.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_SAVE, new CommandWithArgument(
ApplicationCommands
.Save));
190
_oleCmdMappingTable.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_SAVEAS, new CommandWithArgument(
ApplicationCommands
.SaveAs));
191
_oleCmdMappingTable.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_PRINT, new CommandWithArgument(
ApplicationCommands
.Print));
192
_oleCmdMappingTable.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_CUT, new CommandWithArgument(
ApplicationCommands
.Cut));
193
_oleCmdMappingTable.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_COPY, new CommandWithArgument(
ApplicationCommands
.Copy));
194
_oleCmdMappingTable.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_PASTE, new CommandWithArgument(
ApplicationCommands
.Paste));
195
_oleCmdMappingTable.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_PROPERTIES, new CommandWithArgument(
ApplicationCommands
.Properties));
214
_applicationCommandsMappingTable.Add((uint)AppCommands.Edit_Cut, new CommandWithArgument(
ApplicationCommands
.Cut));
215
_applicationCommandsMappingTable.Add((uint)AppCommands.Edit_Copy, new CommandWithArgument(
ApplicationCommands
.Copy));
216
_applicationCommandsMappingTable.Add((uint)AppCommands.Edit_Paste, new CommandWithArgument(
ApplicationCommands
.Paste));
217
_applicationCommandsMappingTable.Add((uint)AppCommands.Edit_SelectAll, new CommandWithArgument(
ApplicationCommands
.SelectAll));
218
_applicationCommandsMappingTable.Add((uint)AppCommands.Edit_Find, new CommandWithArgument(
ApplicationCommands
.Find));
MS\Internal\Documents\DocumentGridContextMenu.cs (3)
153
SetMenuProperties(new EditorMenuItem(), dg,
ApplicationCommands
.Copy); // Copy will be marked as user initiated
156
SetMenuProperties(new MenuItem(), dg,
ApplicationCommands
.SelectAll);
190
SetMenuProperties(new MenuItem(), dg,
ApplicationCommands
.Print);
System\Windows\Controls\DataGrid.cs (3)
73
CommandManager.RegisterClassCommandBinding(typeof(DataGrid), new CommandBinding(
ApplicationCommands
.Copy, new ExecutedRoutedEventHandler(OnExecutedCopy), new CanExecuteRoutedEventHandler(OnCanExecuteCopy)));
2076
return
ApplicationCommands
.Delete;
4328
return
ApplicationCommands
.SelectAll;
System\Windows\Controls\DocumentViewer.cs (3)
1552
ApplicationCommands
.Find,
1766
else if (args.Command ==
ApplicationCommands
.Find)
1876
else if (args.Command ==
ApplicationCommands
.Find)
System\Windows\Controls\FlowDocumentReader.cs (12)
1340
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.Find,
1344
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.Print,
1348
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.CancelPrint,
1411
else if (args.Command ==
ApplicationCommands
.Find)
1415
else if (args.Command ==
ApplicationCommands
.Print)
1419
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1430
args.CanExecute = (args.Command ==
ApplicationCommands
.CancelPrint);
1449
else if (args.Command ==
ApplicationCommands
.Find)
1453
else if (args.Command ==
ApplicationCommands
.Print)
1457
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1610
if (args.Command ==
ApplicationCommands
.Find)
1616
else if (args.Command ==
ApplicationCommands
.Print)
System\Windows\Controls\FlowDocumentScrollViewer.cs (10)
1342
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.Find,
1346
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.Print,
1350
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.CancelPrint,
1413
if (args.Command ==
ApplicationCommands
.Find)
1417
else if (args.Command ==
ApplicationCommands
.Print)
1421
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1432
args.CanExecute = (args.Command ==
ApplicationCommands
.CancelPrint);
1450
if (args.Command ==
ApplicationCommands
.Find)
1454
else if (args.Command ==
ApplicationCommands
.Print)
1458
else if (args.Command ==
ApplicationCommands
.CancelPrint)
System\Windows\Controls\InkCanvas.cs (18)
86
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Delete,
89
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.SelectAll,
2466
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Cut,
2469
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Copy,
2478
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Paste,
2706
if ( command ==
ApplicationCommands
.Delete )
2710
else if ( command ==
ApplicationCommands
.Cut )
2714
else if ( command ==
ApplicationCommands
.Copy )
2718
else if ( command ==
ApplicationCommands
.SelectAll )
2738
else if ( command ==
ApplicationCommands
.Paste )
2782
if ( command ==
ApplicationCommands
.Delete
2783
|| command ==
ApplicationCommands
.Cut
2784
|| command ==
ApplicationCommands
.Copy
2789
else if ( command ==
ApplicationCommands
.Paste )
2804
else if ( command ==
ApplicationCommands
.SelectAll )
2820
if ( command ==
ApplicationCommands
.Cut || command ==
ApplicationCommands
.Copy
2821
|| command ==
ApplicationCommands
.Paste )
System\Windows\Controls\PasswordBox.cs (1)
122
RoutedCommand command =
ApplicationCommands
.Paste;
System\Windows\Controls\Primitives\DocumentViewerBase.cs (6)
1484
CommandHelpers.RegisterCommandHandler(typeof(DocumentViewerBase),
ApplicationCommands
.Print,
1488
CommandHelpers.RegisterCommandHandler(typeof(DocumentViewerBase),
ApplicationCommands
.CancelPrint,
1510
if (args.Command ==
ApplicationCommands
.Print)
1515
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1579
else if (args.Command ==
ApplicationCommands
.Print)
1583
else if (args.Command ==
ApplicationCommands
.CancelPrint)
System\Windows\Controls\SinglePageViewer.cs (4)
1261
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentPageViewer),
ApplicationCommands
.Find,
1299
if (args.Command ==
ApplicationCommands
.Find)
1331
else if (args.Command ==
ApplicationCommands
.Find)
1353
if (args.Command !=
ApplicationCommands
.CancelPrint)
System\Windows\Documents\RubberbandSelector.cs (2)
79
CommandBinding binding = new CommandBinding(
ApplicationCommands
.Copy);
108
if (binding.Command ==
ApplicationCommands
.Copy)
System\windows\Documents\TextEditor.cs (2)
407
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Undo, new ExecutedRoutedEventHandler(OnUndo), new CanExecuteRoutedEventHandler(OnQueryStatusUndo), KeyGesture.CreateFromResourceStrings(KeyUndo, SR.KeyUndoDisplayString), KeyGesture.CreateFromResourceStrings(KeyAltUndo, SR.KeyAltUndoDisplayString));
408
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Redo, new ExecutedRoutedEventHandler(OnRedo), new CanExecuteRoutedEventHandler(OnQueryStatusRedo), KeyGesture.CreateFromResourceStrings(KeyRedo, nameof(SR.KeyRedoDisplayString)));
System\windows\Documents\TextEditorContextMenu.cs (4)
592
menuItem.Command =
ApplicationCommands
.CorrectionList;
609
menuItem.Command =
ApplicationCommands
.Cut;
615
menuItem.Command =
ApplicationCommands
.Copy;
621
menuItem.Command =
ApplicationCommands
.Paste;
System\windows\Documents\TextEditorCopyPaste.cs (3)
50
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Copy, new ExecutedRoutedEventHandler(OnCopy), new CanExecuteRoutedEventHandler(OnQueryStatusCopy), KeyGesture.CreateFromResourceStrings(KeyCopy, SR.KeyCopyDisplayString), KeyGesture.CreateFromResourceStrings(KeyCtrlInsert, SR.KeyCtrlInsertDisplayString));
57
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Cut, new ExecutedRoutedEventHandler(OnCut), new CanExecuteRoutedEventHandler(OnQueryStatusCut), KeyGesture.CreateFromResourceStrings(KeyCut, SR.KeyCutDisplayString), KeyGesture.CreateFromResourceStrings(KeyShiftDelete, SR.KeyShiftDeleteDisplayString));
62
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Paste, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler, inputGesture);
System\windows\Documents\TextEditorSelection.cs (1)
56
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.SelectAll, new ExecutedRoutedEventHandler(OnSelectAll), queryStatusKeyboardSelectionHandler, KeySelectAll, nameof(SR.KeySelectAllDisplayString));
System\windows\Documents\TextEditorTyping.cs (1)
78
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.CorrectionList , new ExecutedRoutedEventHandler(OnCorrectionList) , new CanExecuteRoutedEventHandler(OnQueryStatusCorrectionList) , nameof(SR.KeyCorrectionList), nameof(SR.KeyCorrectionListDisplayString) );
System\Windows\FrameworkCompatibilityPreferences.cs (2)
362
/// the application would take control of handling <see cref="System.Windows.Input.
ApplicationCommands
.Cut"/>
363
/// and <see cref="System.Windows.Input.
ApplicationCommands
.Copy"/> RoutedUICommands through a
System\Windows\Input\Command\CommandConverter.cs (26)
202
if (commandType == typeof(
ApplicationCommands
) ||
306
if (ownerType == typeof(
ApplicationCommands
) || ((null == knownCommand) && searchAll))
311
knownCommand =
ApplicationCommands
.Cut;
314
knownCommand =
ApplicationCommands
.Copy;
317
knownCommand =
ApplicationCommands
.Paste;
320
knownCommand =
ApplicationCommands
.Undo;
323
knownCommand =
ApplicationCommands
.Redo;
326
knownCommand =
ApplicationCommands
.Delete;
329
knownCommand =
ApplicationCommands
.Find;
332
knownCommand =
ApplicationCommands
.Replace;
335
knownCommand =
ApplicationCommands
.Help;
338
knownCommand =
ApplicationCommands
.New;
341
knownCommand =
ApplicationCommands
.Open;
344
knownCommand =
ApplicationCommands
.Save;
347
knownCommand =
ApplicationCommands
.SaveAs;
350
knownCommand =
ApplicationCommands
.Close;
353
knownCommand =
ApplicationCommands
.Print;
356
knownCommand =
ApplicationCommands
.CancelPrint;
359
knownCommand =
ApplicationCommands
.PrintPreview;
362
knownCommand =
ApplicationCommands
.Properties;
365
knownCommand =
ApplicationCommands
.ContextMenu;
368
knownCommand =
ApplicationCommands
.CorrectionList;
371
knownCommand =
ApplicationCommands
.SelectAll;
374
knownCommand =
ApplicationCommands
.Stop;
377
knownCommand =
ApplicationCommands
.NotACommand;
748
VerifyCommandDoesntExist( typeof(
ApplicationCommands
), localName );
PresentationUI (15)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (15)
1308
if (e.Command.Equals(
ApplicationCommands
.Save))
1321
else if (e.Command.Equals(
ApplicationCommands
.SaveAs))
1327
else if (e.Command.Equals(
ApplicationCommands
.Properties))
1363
if (e.Command.Equals(
ApplicationCommands
.Save))
1378
else if (e.Command.Equals(
ApplicationCommands
.SaveAs))
1386
else if (e.Command.Equals(
ApplicationCommands
.Properties))
2065
BindCommand(
ApplicationCommands
.Save, executeHandler, queryEnabledHandler);
2070
BindCommand(
ApplicationCommands
.SaveAs, executeHandler, queryEnabledHandler);
2075
BindCommand(
ApplicationCommands
.Properties, executeHandler, queryEnabledHandler);
2156
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.Print, RightsManagementPolicy.AllowPrint));
2157
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.PrintPreview, RightsManagementPolicy.AllowPrint));
2160
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.Copy, RightsManagementPolicy.AllowCopy));
2161
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.Cut, RightsManagementPolicy.AllowCopy));
2162
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.Save, RightsManagementPolicy.AllowCopy));
2163
enforcer.AddBinding(new PolicyBinding(
ApplicationCommands
.SaveAs, RightsManagementPolicy.AllowCopy));