EditingCommands クラス
定義
一連の標準的な編集関連コマンドを提供します。Provides a standard set of editing related commands.
public ref class EditingCommands abstract sealed
public static class EditingCommands
type EditingCommands = class
Public Class EditingCommands
- 継承
-
EditingCommands
例
次の例は、コマンドをサポートするオブジェクトで編集コマンドを呼び出す方法を示しています。The following example demonstrates how to invoke an editing command on an object that supports the command.
この例では、 RichTextBoxはコマンドターゲットとして機能します。For this example, a RichTextBox serves as the command target. でRichTextBox FrameworkElementはIInputElement 、インターフェイス (から継承) が実装されており、多くの編集コマンドがネイティブでサポートされていることに注意してください。Note that RichTextBox implements the IInputElement interface (inherited from FrameworkElement), and that it includes native support for many editing commands.
Executeメソッドの最初の引数は、コマンドパラメーターです。The first argument for the Execute method is a command parameter. ほとんどの編集コマンドは、コマンドパラメーターを無視します。一般に、このパラメーターはnull
編集コマンドに対してである必要があります。Most editing commands ignore the command parameter; in general, this parameter should be null
for editing commands.
2番目の引数は、コマンドがルーティングされるオブジェクトを指定します。The second argument specifies the object to which the command will be routed. このオブジェクトは、 IInputElementインターフェイスを実装する必要があります。また、指定したコマンドのハンドラーを含める必要があります。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)
注釈
次の表に、編集コマンドと、関連付けられている既定のキージェスチャKey ( ModifierKeysおよび列挙のキー名を含む) を示します。The following table shows the editing commands and the associated default key gestures (with key names from the Key and ModifierKeys enumerations).
キャレット移動コマンドと選択範囲の展開コマンドは、既定のキージェスチャの共通セットを共有します。一般的Shiftな違いは、選択コマンドをキャレット移動コマンドから区別するためにキーを追加することです。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. MoveLeftByCharacterたとえばLeft、コマンドの既定のSelectLeftByCharacter Leftキージェスチャはであり、対応するコマンドにはの既定のShift +キージェスチャがあります。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.
一般に、 EditingCommandsクラスによって提供されるコマンド定義では、コマンドパラメーター parameter
( Executeメソッドによって予期されるパラメーター) は使用されません。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.
プロパティ
AlignCenter |
現在の段落または段落の選択範囲を中央揃えで配置するよう要求する AlignCenter コマンドを表します。Represents the AlignCenter command, which requests that the current paragraph or a selection of paragraphs be centered. |
AlignJustify |
現在の段落または段落の選択範囲を両端揃えで配置するよう要求する AlignJustify コマンドを表します。Represents the AlignJustify command, which requests that the current paragraph or a selection of paragraphs be justified. |
AlignLeft |
コンテンツの選択範囲を左揃えで配置するよう要求する AlignLeft コマンドを表します。Represents the AlignLeft command, which requests that a selection of content be aligned left. |
AlignRight |
コンテンツの選択範囲を右揃えで配置するよう要求する AlignRight コマンドを表します。Represents the AlignRight command, which requests that a selection of content be aligned right. |
Backspace |
BackSpace を現在の位置または現在の選択範囲に対して入力するよう要求する Backspace コマンドを表します。Represents the Backspace command, which requests that a backspace be entered at the current position or over the current selection. |
CorrectSpellingError |
現在の位置にあるスペル ミスの単語を修正するよう要求する CorrectSpellingError コマンドを表します。Represents the CorrectSpellingError command, which requests that any misspelled word at the current position be corrected. |
DecreaseFontSize |
現在の選択範囲のフォント サイズを 1 ポイント縮小するよう要求する DecreaseFontSize コマンドを表します。Represents the DecreaseFontSize command, which requests that the font size for the current selection be decreased by 1 point. |
DecreaseIndentation |
現在の段落のインデントを 1 タブ位置分減らすよう要求する DecreaseIndentation コマンドを表します。Represents the DecreaseIndentation command, which requests that indentation for the current paragraph be decreased by one tab stop. |
Delete |
現在の選択範囲を削除するよう要求する Delete コマンドを表します。Represents the Delete command, which requests that the current selection be deleted. |
DeleteNextWord |
現在の位置から見て次の単語を削除するよう要求する DeleteNextWord コマンドを表します。Represents the DeleteNextWord command, which requests that the next word (relative to a current position) be deleted. |
DeletePreviousWord |
現在の位置から見て前の単語を削除するよう要求する DeletePreviousWord コマンドを表します。Represents the DeletePreviousWord command, which requests that the previous word (relative to a current position) be deleted. |
EnterLineBreak |
改行を現在の位置または現在の選択範囲に対して挿入するよう要求する EnterLineBreak コマンドを表します。Represents the EnterLineBreak command, which requests that a line break be inserted at the current position or over the current selection. |
EnterParagraphBreak |
段落区切りを現在の位置または現在の選択範囲を超えた位置に挿入するよう要求する EnterParagraphBreak コマンドを表します。Represents the EnterParagraphBreak command, which requests that a paragraph break be inserted at the current position or over the current selection. |
IgnoreSpellingError |
現在の位置または現在の選択範囲内にあるスペル ミスの単語をすべて無視するよう要求する IgnoreSpellingError コマンドを表します。Represents the IgnoreSpellingError command, which requests that any instances of misspelled words at the current position or in the current selection be ignored. |
IncreaseFontSize |
現在の選択範囲のフォント サイズを 1 ポイント拡大するよう要求する IncreaseFontSize コマンドを表します。Represents the IncreaseFontSize command, which requests that the font size for the current selection be increased by 1 point. |
IncreaseIndentation |
現在の段落のインデントを 1 タブ位置分増やすよう要求する IncreaseIndentation コマンドを表します。Represents the IncreaseIndentation command, which requests that indentation for the current paragraph be increased by one tab stop. |
MoveDownByLine |
キャレットを 1 行下に移動するよう要求する MoveDownByLine コマンドを表します。Represents the MoveDownByLine command, which requests that the caret move down by one line. |
MoveDownByPage |
キャレットを 1 ページ下に移動するよう要求する MoveDownByPage コマンドを表します。Represents the MoveDownByPage command, which requests that the caret move down by one page. |
MoveDownByParagraph |
キャレットを 1 段落下に移動するよう要求する MoveDownByParagraph コマンドを表します。Represents the MoveDownByParagraph command, which requests that the caret move down by one paragraph. |
MoveLeftByCharacter |
キャレットを 1 文字左に移動するよう要求する MoveLeftByCharacter コマンドを表します。Represents the MoveLeftByCharacter command, which requests that the caret move one character left. |
MoveLeftByWord |
キャレットを 1 語左に移動するよう要求する MoveLeftByWord コマンドを表します。Represents the MoveLeftByWord command, which requests that the caret move one word left. |
MoveRightByCharacter |
キャレットを 1 文字右に移動するよう要求する MoveRightByCharacter コマンドを表します。Represents the MoveRightByCharacter command, which requests that the caret move one character right. |
MoveRightByWord |
キャレットを 1 語右に移動するよう要求する MoveRightByWord コマンドを表します。Represents the MoveRightByWord command, which requests that the caret move right by one word. |
MoveToDocumentEnd |
キャレットをコンテンツの末尾に移動するよう要求する MoveToDocumentEnd コマンドを表します。Represents the MoveToDocumentEnd command, which requests that the caret move to the very end of content. |
MoveToDocumentStart |
キャレットをコンテンツの先頭に移動するよう要求する MoveToDocumentStart コマンドを表します。Represents the MoveToDocumentStart command, which requests that the caret move to the very beginning of content. |
MoveToLineEnd |
キャレットを現在の行の末尾に移動するよう要求する MoveToLineEnd コマンドを表します。Represents the MoveToLineEnd command, which requests that the caret move to the end of the current line. |
MoveToLineStart |
キャレットを現在の行の先頭に移動するよう要求する MoveToLineStart コマンドを表します。Represents the MoveToLineStart command, which requests that the caret move to the beginning of the current line. |
MoveUpByLine |
キャレットを 1 行上に移動するよう要求する MoveUpByLine コマンドを表します。Represents the MoveUpByLine command, which requests that the caret move up by one line. |
MoveUpByPage |
キャレットを 1 ページ上に移動するよう要求する MoveUpByPage コマンドを表します。Represents the MoveUpByPage command, which requests that the caret move up by one page. |
MoveUpByParagraph |
キャレットを 1 段落上に移動するよう要求する MoveUpByParagraph コマンドを表します。Represents the MoveUpByParagraph command, which requests that the caret move up by one paragraph. |
SelectDownByLine |
現在の選択範囲を 1 行下に拡張するよう要求する SelectDownByLine コマンドを表します。Represents the SelectDownByLine command, which requests that the current selection be expanded down by one line. |
SelectDownByPage |
現在の選択範囲を 1 ページ下に拡張するよう要求する SelectDownByPage コマンドを表します。Represents the SelectDownByPage command, which requests that the current selection be expanded down by one page. |
SelectDownByParagraph |
現在の選択範囲を 1 段落下に拡張するよう要求する SelectDownByParagraph コマンドを表します。Represents the SelectDownByParagraph command, which requests that the current selection be expanded down by one paragraph. |
SelectLeftByCharacter |
現在の選択範囲を 1 文字左に拡張するよう要求する SelectLeftByCharacter コマンドを表します。Represents the SelectLeftByCharacter command, which requests that the current selection be expanded left by one character. |
SelectLeftByWord |
現在の選択範囲を 1 語左に拡張するよう要求する SelectLeftByWord コマンドを表します。Represents the SelectLeftByWord command, which requests that the current selection be expanded left by one word. |
SelectRightByCharacter |
現在の選択範囲を 1 文字右に拡張するよう要求する SelectRightByCharacter コマンドを表します。Represents the SelectRightByCharacter command, which requests that the current selection be expanded right by one character. |
SelectRightByWord |
現在の選択範囲を 1 語右に拡張するよう要求する SelectRightByWord コマンドを表します。Represents the SelectRightByWord command, which requests that the current selection be expanded right by one word. |
SelectToDocumentEnd |
現在の選択範囲をコンテンツの末尾まで拡張するよう要求する SelectToDocumentEnd コマンドを表します。Represents the SelectToDocumentEnd command, which requests that the current selection be expanded to the very end of content. |
SelectToDocumentStart |
現在の選択範囲をコンテンツの先頭まで拡張するよう要求する SelectToDocumentStart コマンドを表します。Represents the SelectToDocumentStart command, which requests that the current selection be expanded to the very beginning of content. |
SelectToLineEnd |
現在の選択範囲を現在の行の末尾まで拡張するよう要求する SelectToLineEnd コマンドを表します。Represents the SelectToLineEnd command, which requests that the current selection be expanded to the end of the current line. |
SelectToLineStart |
現在の選択範囲を現在の行の先頭まで拡張するよう要求する SelectToLineStart コマンドを表します。Represents the SelectToLineStart command, which requests that the current selection be expanded to the beginning of the current line. |
SelectUpByLine |
現在の選択範囲を 1 行上に拡張するよう要求する SelectUpByLine コマンドを表します。Represents the SelectUpByLine command, which requests that the current selection be expanded up by one line. |
SelectUpByPage |
現在の選択範囲を 1 ページ上に拡張するよう要求する SelectUpByPage コマンドを表します。Represents the SelectUpByPage command, which requests that the current selection be expanded up by one page. |
SelectUpByParagraph |
現在の選択範囲を 1 段落上に拡張するよう要求する SelectUpByParagraph コマンドを表します。Represents the SelectUpByParagraph command, which requests that the current selection be expanded up by one paragraph. |
TabBackward |
TabBackward コマンドを表します。Represents the TabBackward command. |
TabForward |
TabForward コマンドを表します。Represents the TabForward command. |
ToggleBold |
現在の選択範囲に対して ToggleBold の書式設定を切り替えるよう要求する Bold コマンドを表します。Represents the ToggleBold command, which requests that Bold formatting be toggled on the current selection. |
ToggleBullets |
現在の選択範囲に対して順序の付いていないリスト (箇条書きリスト) の書式設定を切り替えるよう要求する ToggleBullets コマンドを表します。Represents the ToggleBullets command, which requests that unordered list (also referred to as bulleted list) formatting be toggled on the current selection. |
ToggleInsert |
挿入と上書きの入力モードを切り替える ToggleInsert コマンドを表します。Represents the ToggleInsert command, which toggles the typing mode between Insert and Overtype. |
ToggleItalic |
現在の選択範囲に対して ToggleItalic の書式設定を切り替えるよう要求する Italic コマンドを表します。Represents the ToggleItalic command, which requests that Italic formatting be toggled on the current selection. |
ToggleNumbering |
現在の選択範囲に対して順序付きリスト (番号付きリスト) の書式設定を切り替えるよう要求する ToggleNumbering コマンドを表します。Represents the ToggleNumbering command, which requests that ordered list (also referred to as numbered list) formatting be toggled on the current selection. |
ToggleSubscript |
現在の選択範囲に対して下付き文字の書式設定を切り替えるよう要求する ToggleSubscript コマンドを表します。Represents the ToggleSubscript command, which requests that subscript formatting be toggled on the current selection. |
ToggleSuperscript |
現在の選択範囲に対して上付き文字の書式設定を切り替えるよう要求する ToggleSuperscript コマンドを表します。Represents the ToggleSuperscript command, which requests that superscript formatting be toggled on the current selection. |
ToggleUnderline |
現在の選択範囲に対して ToggleUnderline の書式設定を切り替えるよう要求する Underline コマンドを表します。Represents the ToggleUnderline command, which requests that Underline formatting be toggled on the current selection. |