139 references to ApplicationCommands
PresentationCore (21)
Core\CSharp\System\Windows\Input\Command\ApplicationCommands.cs (1)
487
typeof(
ApplicationCommands
), (byte)idCommand,
Core\CSharp\System\Windows\Input\Command\CommandDevice.cs (13)
224
appCommand =
ApplicationCommands
.Help;
227
appCommand =
ApplicationCommands
.Find;
230
appCommand =
ApplicationCommands
.New;
233
appCommand =
ApplicationCommands
.Open;
236
appCommand =
ApplicationCommands
.Close;
239
appCommand =
ApplicationCommands
.Save;
242
appCommand =
ApplicationCommands
.Print;
245
appCommand =
ApplicationCommands
.Undo;
248
appCommand =
ApplicationCommands
.Redo;
251
appCommand =
ApplicationCommands
.Copy;
254
appCommand =
ApplicationCommands
.Cut;
257
appCommand =
ApplicationCommands
.Paste;
269
appCommand =
ApplicationCommands
.CorrectionList;
Core\CSharp\System\Windows\Input\Command\CommandManager.cs (1)
461
if (command != null && command !=
ApplicationCommands
.NotACommand)
Core\CSharp\System\Windows\Input\Command\InputBinding.cs (2)
216
&& command !=
ApplicationCommands
.Cut
217
&& command !=
ApplicationCommands
.Copy)
Core\CSharp\System\Windows\Input\Command\RoutedCommand.cs (2)
282
if(OwnerType == typeof(
ApplicationCommands
))
284
return
ApplicationCommands
.LoadDefaultGestureFromResource(_commandId);
Core\CSharp\System\Windows\Input\Command\RoutedUICommand.cs (2)
98
if(OwnerType == typeof(
ApplicationCommands
))
100
return
ApplicationCommands
.GetUIText(CommandId);
PresentationFramework (115)
src\Framework\MS\Internal\AppModel\OleCmdHelper.cs (12)
223
_oleCmdMappingTable.Value.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_SAVE, new CommandWithArgument(
ApplicationCommands
.Save));
224
_oleCmdMappingTable.Value.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_SAVEAS, new CommandWithArgument(
ApplicationCommands
.SaveAs));
225
_oleCmdMappingTable.Value.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_PRINT, new CommandWithArgument(
ApplicationCommands
.Print));
226
_oleCmdMappingTable.Value.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_CUT, new CommandWithArgument(
ApplicationCommands
.Cut));
227
_oleCmdMappingTable.Value.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_COPY, new CommandWithArgument(
ApplicationCommands
.Copy));
228
_oleCmdMappingTable.Value.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_PASTE, new CommandWithArgument(
ApplicationCommands
.Paste));
229
_oleCmdMappingTable.Value.Add((uint)UnsafeNativeMethods.OLECMDID.OLECMDID_PROPERTIES, new CommandWithArgument(
ApplicationCommands
.Properties));
255
_applicationCommandsMappingTable.Value.Add((uint)AppCommands.Edit_Cut, new CommandWithArgument(
ApplicationCommands
.Cut));
256
_applicationCommandsMappingTable.Value.Add((uint)AppCommands.Edit_Copy, new CommandWithArgument(
ApplicationCommands
.Copy));
257
_applicationCommandsMappingTable.Value.Add((uint)AppCommands.Edit_Paste, new CommandWithArgument(
ApplicationCommands
.Paste));
258
_applicationCommandsMappingTable.Value.Add((uint)AppCommands.Edit_SelectAll, new CommandWithArgument(
ApplicationCommands
.SelectAll));
259
_applicationCommandsMappingTable.Value.Add((uint)AppCommands.Edit_Find, new CommandWithArgument(
ApplicationCommands
.Find));
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (3)
61
CommandHelpers.RegisterCommandHandler(typeof(RootBrowserWindow),
ApplicationCommands
.Print,
943
if (
ApplicationCommands
.Print.CanExecute(null, target))
945
ApplicationCommands
.Print.Execute(null, target);
src\Framework\MS\Internal\Documents\DocumentGridContextMenu.cs (3)
185
SetMenuProperties(new EditorMenuItem(), dg,
ApplicationCommands
.Copy); // Copy will be marked as user initiated
188
SetMenuProperties(new MenuItem(), dg,
ApplicationCommands
.SelectAll);
222
SetMenuProperties(new MenuItem(), dg,
ApplicationCommands
.Print);
src\Framework\System\Windows\Controls\DataGrid.cs (3)
74
CommandManager.RegisterClassCommandBinding(typeof(DataGrid), new CommandBinding(
ApplicationCommands
.Copy, new ExecutedRoutedEventHandler(OnExecutedCopy), new CanExecuteRoutedEventHandler(OnCanExecuteCopy)));
2080
return
ApplicationCommands
.Delete;
4333
return
ApplicationCommands
.SelectAll;
src\Framework\System\Windows\Controls\DocumentViewer.cs (3)
1577
ApplicationCommands
.Find,
1799
else if (args.Command ==
ApplicationCommands
.Find)
1910
else if (args.Command ==
ApplicationCommands
.Find)
src\Framework\System\Windows\Controls\FlowDocumentReader.cs (12)
1346
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.Find,
1350
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.Print,
1354
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentReader),
ApplicationCommands
.CancelPrint,
1417
else if (args.Command ==
ApplicationCommands
.Find)
1421
else if (args.Command ==
ApplicationCommands
.Print)
1425
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1436
args.CanExecute = (args.Command ==
ApplicationCommands
.CancelPrint);
1455
else if (args.Command ==
ApplicationCommands
.Find)
1459
else if (args.Command ==
ApplicationCommands
.Print)
1463
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1616
if (args.Command ==
ApplicationCommands
.Find)
1622
else if (args.Command ==
ApplicationCommands
.Print)
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (10)
1350
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.Find,
1354
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.Print,
1358
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentScrollViewer),
ApplicationCommands
.CancelPrint,
1421
if (args.Command ==
ApplicationCommands
.Find)
1425
else if (args.Command ==
ApplicationCommands
.Print)
1429
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1440
args.CanExecute = (args.Command ==
ApplicationCommands
.CancelPrint);
1458
if (args.Command ==
ApplicationCommands
.Find)
1462
else if (args.Command ==
ApplicationCommands
.Print)
1466
else if (args.Command ==
ApplicationCommands
.CancelPrint)
src\Framework\System\Windows\Controls\InkCanvas.cs (18)
97
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Delete,
100
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.SelectAll,
2598
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Cut,
2601
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Copy,
2613
CommandHelpers.RegisterCommandHandler(ownerType,
ApplicationCommands
.Paste,
2846
if ( command ==
ApplicationCommands
.Delete )
2850
else if ( command ==
ApplicationCommands
.Cut )
2854
else if ( command ==
ApplicationCommands
.Copy )
2858
else if ( command ==
ApplicationCommands
.SelectAll )
2878
else if ( command ==
ApplicationCommands
.Paste )
2928
if ( command ==
ApplicationCommands
.Delete
2929
|| command ==
ApplicationCommands
.Cut
2930
|| command ==
ApplicationCommands
.Copy
2935
else if ( command ==
ApplicationCommands
.Paste )
2950
else if ( command ==
ApplicationCommands
.SelectAll )
2966
if ( command ==
ApplicationCommands
.Cut || command ==
ApplicationCommands
.Copy
2967
|| command ==
ApplicationCommands
.Paste )
src\Framework\System\Windows\Controls\PasswordBox.cs (1)
125
RoutedCommand command =
ApplicationCommands
.Paste;
src\Framework\System\Windows\Controls\Primitives\DocumentViewerBase.cs (6)
1496
CommandHelpers.RegisterCommandHandler(typeof(DocumentViewerBase),
ApplicationCommands
.Print,
1500
CommandHelpers.RegisterCommandHandler(typeof(DocumentViewerBase),
ApplicationCommands
.CancelPrint,
1522
if (args.Command ==
ApplicationCommands
.Print)
1527
else if (args.Command ==
ApplicationCommands
.CancelPrint)
1591
else if (args.Command ==
ApplicationCommands
.Print)
1595
else if (args.Command ==
ApplicationCommands
.CancelPrint)
src\Framework\System\Windows\Controls\SinglePageViewer.cs (4)
1268
CommandHelpers.RegisterCommandHandler(typeof(FlowDocumentPageViewer),
ApplicationCommands
.Find,
1306
if (args.Command ==
ApplicationCommands
.Find)
1338
else if (args.Command ==
ApplicationCommands
.Find)
1360
if (args.Command !=
ApplicationCommands
.CancelPrint)
src\Framework\System\Windows\Documents\RubberbandSelector.cs (2)
94
CommandBinding binding = new CommandBinding(
ApplicationCommands
.Copy);
123
if (binding.Command ==
ApplicationCommands
.Copy)
src\Framework\System\windows\Documents\TextEditor.cs (2)
422
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Undo, new ExecutedRoutedEventHandler(OnUndo), new CanExecuteRoutedEventHandler(OnQueryStatusUndo), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyUndo), SR.Get(SRID.KeyUndoDisplayString)), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyAltUndo), SR.Get(SRID.KeyAltUndoDisplayString)));
423
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Redo, new ExecutedRoutedEventHandler(OnRedo), new CanExecuteRoutedEventHandler(OnQueryStatusRedo), SRID.KeyRedo, SRID.KeyRedoDisplayString);
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (4)
624
menuItem.Command =
ApplicationCommands
.CorrectionList;
649
menuItem.Command =
ApplicationCommands
.Cut;
655
menuItem.Command =
ApplicationCommands
.Copy;
667
menuItem.Command =
ApplicationCommands
.Paste;
src\Framework\System\windows\Documents\TextEditorCopyPaste.cs (3)
59
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Copy, new ExecutedRoutedEventHandler(OnCopy), new CanExecuteRoutedEventHandler(OnQueryStatusCopy), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyCopy), SR.Get(SRID.KeyCopyDisplayString)), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyCtrlInsert), SR.Get(SRID.KeyCtrlInsertDisplayString)));
66
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Cut, new ExecutedRoutedEventHandler(OnCut), new CanExecuteRoutedEventHandler(OnQueryStatusCut), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyCut), SR.Get(SRID.KeyCutDisplayString)), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyShiftDelete), SR.Get(SRID.KeyShiftDeleteDisplayString)));
74
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.Paste, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler, inputGesture);
src\Framework\System\windows\Documents\TextEditorSelection.cs (1)
64
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.SelectAll, new ExecutedRoutedEventHandler(OnSelectAll), queryStatusKeyboardSelectionHandler, SRID.KeySelectAll, SRID.KeySelectAllDisplayString);
src\Framework\System\windows\Documents\TextEditorTyping.cs (1)
81
CommandHelpers.RegisterCommandHandler(controlType,
ApplicationCommands
.CorrectionList , new ExecutedRoutedEventHandler(OnCorrectionList) , new CanExecuteRoutedEventHandler(OnQueryStatusCorrectionList) , SRID.KeyCorrectionList, SRID.KeyCorrectionListDisplayString );
src\Framework\System\Windows\FrameworkCompatibilityPreferences.cs (2)
401
/// the application would take control of handling <see cref="System.Windows.Input.
ApplicationCommands
.Cut"/>
402
/// and <see cref="System.Windows.Input.
ApplicationCommands
.Copy"/> RoutedUICommands through a
src\Framework\System\Windows\Input\Command\CommandConverter.cs (25)
212
if (commandType == typeof(
ApplicationCommands
) ||
317
if (ownerType == typeof(
ApplicationCommands
) || ((null == knownCommand) && searchAll))
322
knownCommand =
ApplicationCommands
.Cut;
325
knownCommand =
ApplicationCommands
.Copy;
328
knownCommand =
ApplicationCommands
.Paste;
331
knownCommand =
ApplicationCommands
.Undo;
334
knownCommand =
ApplicationCommands
.Redo;
337
knownCommand =
ApplicationCommands
.Delete;
340
knownCommand =
ApplicationCommands
.Find;
343
knownCommand =
ApplicationCommands
.Replace;
346
knownCommand =
ApplicationCommands
.Help;
349
knownCommand =
ApplicationCommands
.New;
352
knownCommand =
ApplicationCommands
.Open;
355
knownCommand =
ApplicationCommands
.Save;
358
knownCommand =
ApplicationCommands
.SaveAs;
361
knownCommand =
ApplicationCommands
.Close;
364
knownCommand =
ApplicationCommands
.Print;
367
knownCommand =
ApplicationCommands
.CancelPrint;
370
knownCommand =
ApplicationCommands
.PrintPreview;
373
knownCommand =
ApplicationCommands
.Properties;
376
knownCommand =
ApplicationCommands
.ContextMenu;
379
knownCommand =
ApplicationCommands
.CorrectionList;
382
knownCommand =
ApplicationCommands
.SelectAll;
385
knownCommand =
ApplicationCommands
.Stop;
388
knownCommand =
ApplicationCommands
.NotACommand;
System.Activities.Presentation (3)
System.Activities.Presentation\System\Activities\Presentation\DialogWindow.cs (2)
49
this.CommandBindings.Add(new CommandBinding(
ApplicationCommands
.Help, new ExecutedRoutedEventHandler(OnHelpExecuted)));
63
ApplicationCommands
.Help.Execute(null, focusedElement);
System.Activities.Presentation\System\Activities\Presentation\ErrorReporting.cs (1)
160
var copyBinding = new CommandBinding(
ApplicationCommands
.Copy);