EditingCommands Class
 

Provides a standard set of editing related commands.

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

SystemObject
  System.Windows.DocumentsEditingCommands

public static class EditingCommands
public ref class EditingCommands abstract sealed 
[<AbstractClass>]
[<Sealed>]
type EditingCommands = class end
Public NotInheritable Class EditingCommands
NameDescription
System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current paragraph or a selection of paragraphs be centered.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current paragraph or a selection of paragraphs be justified.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that a selection of content be aligned left.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that a selection of content be aligned right.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that a backspace be entered at the current position or over the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that any misspelled word at the current position be corrected.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the font size for the current selection be decreased by 1 point.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that indentation for the current paragraph be decreased by one tab stop.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be deleted.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the next word (relative to a current position) be deleted.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the previous word (relative to a current position) be deleted.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that a line break be inserted at the current position or over the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that a paragraph break be inserted at the current position or over the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that any instances of misspelled words at the current position or in the current selection be ignored.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the font size for the current selection be increased by 1 point.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that indentation for the current paragraph be increased by one tab stop.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move down by one line.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move down by one page.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move down by one paragraph.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move one character left.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move one word left.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move one character right.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move right by one word.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move to the very end of content.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move to the very beginning of content.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move to the end of the current line.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move to the beginning of the current line.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move up by one line.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move up by one page.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the caret move up by one paragraph.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded down by one line.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded down by one page.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded down by one paragraph.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded left by one character.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded left by one word.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded right by one character.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded right by one word.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded to the very end of content.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded to the very beginning of content.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded to the end of the current line.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded to the beginning of the current line.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded up by one line.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded up by one page.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that the current selection be expanded up by one paragraph.

System_CAPS_pubproperty System_CAPS_static

Represents the command.

System_CAPS_pubproperty System_CAPS_static

Represents the command.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that Bold formatting be toggled on the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that unordered list (also referred to as bulleted list) formatting be toggled on the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which toggles the typing mode between Insert and Overtype.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that Italic formatting be toggled on the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that ordered list (also referred to as numbered list) formatting be toggled on the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that subscript formatting be toggled on the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that superscript formatting be toggled on the current selection.

System_CAPS_pubproperty System_CAPS_static

Represents the command, which requests that Underline formatting be toggled on the current selection.

The following table shows the editing commands and the associated default key gestures (with key names from the Key and ModifierKeys enumerations).

Editing command

Default key gesture

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 command has a default key gesture of Left, and the corresponding 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 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 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);
Dim rTB As New RichTextBox()

EditingCommands.ToggleInsert.Execute(Nothing, rTB)
.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top