EditingCommands Class
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
| Editing Command | Default Key Gesture(s) |
|---|---|
| Ctrl+E | |
| Ctrl+J | |
| Ctrl+L | |
| Ctrl+R | |
| Backspace | |
| no default key gesture | |
| Ctrl+OemOpenBrackets | |
| Ctrl+Shift+T | |
| Delete | |
| Ctrl+Delete | |
| Ctrl+Backspace | |
| Shift+Enter | |
| Enter | |
| no default key gesture | |
| Ctrl+OemCloseBrackets | |
| Ctrl+T | |
| Down | |
| PageDown | |
| Ctrl+Down | |
| Left | |
| Ctrl+Left | |
| Right | |
| Ctrl+Right | |
| Ctrl+End | |
| Ctrl+Home | |
| End | |
| Home | |
| Up | |
| PageUp | |
| Ctrl+Up | |
| Shift+Down | |
| Shift+PageDown | |
| Ctrl+Shift+Down | |
| Shift+Left | |
| Ctrl+Shift+Left | |
| Shift+Right | |
| Ctrl+Shift+Right | |
| Ctrl+Shift+End | |
| Ctrl+Shift+Home | |
| Shift+End | |
| Shift+Home | |
| Shift+Up | |
| Shift+PageUp | |
| Ctrl+Shift+Up | |
| Shift+Tab | |
| Tab | |
| Ctrl+B | |
| Ctrl+Shift+L | |
| Insert | |
| Ctrl+I | |
| Ctrl+Shift+N | |
| Ctrl+OemPlus | |
| Ctrl+Shift+OemPlus | |
| Ctrl+U |
Caret movement commands and selection expanding commands share a common set of default key gestures, the general difference being the addition of the Shift key to differentiate selection commands from caret movement commands. For example, the MoveLeftByCharacter command has a default key gesture of Left, and the corresponding SelectLeftByCharacter command has a default key gesture of Shift+Left.
In general, the command definitions provided by the EditingCommands class do not make use of command parameters (the parameter parameter expected by the Execute method).
For more information on commands and commanding see the Input Overview.
The following example demonstrates how to invoke an editing command on an object that supports the command.
For this example, a RichTextBox serves as the command target. Note that RichTextBox implements the IInputElement interface (inherited from FrameworkElement), and that it includes native support for many editing commands.
The first argument for the Execute method is a command parameter. Most editing commands ignore the command parameter; in general this parameter should be left null for editing commands.
The second argument specifies the object to which the command will be routed. This object must implement the IInputElement interface, and should include a handler for the specified command. Generally, a command is ignored when invoked on an object that does not handle the command.
RichTextBox rTB = new RichTextBox(); EditingCommands.ToggleInsert.Execute(null, rTB);
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.