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