

'宣言 Public MustInherit NotInheritable Class FieldsEditingCommands
public static class FieldsEditingCommands
FieldsEditingCommands クラスのコマンドと、その他のコマンドライブラリクラス(System.Windows.Input.ApplicationCommands など)のコマンドは、FieldsEditorControl のプログラマがよく使用する一連の一般的なコマンドを表すためのものです。これらのコマンドは System.Windows.Input.RoutedCommand のインスタンスを表すだけであり、コマンドの実装ロジックは表しません。実装ロジックは、System.Windows.Input.CommandBinding を使用してコマンドに連結されます。たとえば、IM コントロールで MoveLeftByField コマンドを実行する場合、MoveLeftByField コマンドを実行するロジックは IM コントロールによって提供されない場合があるため、IM コントロールでのコマンドの処理方法を決定するロジックを記述するのはアプリケーション作成者の役割になります。
IMの FieldsEditorControl コントロール(GrapeCity.Windows.InputMan.GcDateTime、GrapeCity.Windows.InputMan.GcMask、GrapeCity.Windows.InputMan.GcNumber)では、コマンドライブラリに含まれる多くのコマンドの実装ロジックを提供しています。
| フィールド編集コマンド | 既定のキージェスチャ | 
|---|---|
| Clear | F4 | 
| DeleteNextCharacter | Delete | 
| DeleteNextCharactersByField | Ctrl+Delete | 
| DeletePreviousCharacter | Backspace | 
| DeletePreviousCharactersByField | Ctrl+Backspace | 
| MoveLeftByCharacter | Left | 
| MoveLeftByField | Ctrl+Left | 
| MoveRightByCharacter | Right | 
| MoveRightByField | Ctrl+Right | 
| MoveToFirst | Home | 
| MoveToFirstFieldStart | Ctrl+Home | 
| MoveToLast | End | 
| MoveToLastFieldEnd | Ctrl+End | 
| NextField | - | 
| NextFieldThenControl | - | 
| PreviousField | - | 
| PreviousFieldThenControl | - | 
| SelectLeftByCharacter | Shift+Left | 
| SelectLeftByField | Shift+Ctrl+Left | 
| SelectRightByCharacter | Shift+Right | 
| SelectRightByField | Shift+Ctrl+Right | 
| SelectToFirst | Shift+Home | 
| SelectToFirstFieldStart | Shift+Ctrl+Home | 
| SelectToLast | Shift+End | 
| SelectToLastFieldEnd | Shift+Ctrl+End | 
| SpinDown | Down | 
| SpinUp | Up | 
次の例では、InputMan コントロールに System.Windows.Input.RoutedCommand をフックする方法を示します。
InputMan には、アプリケーションプログラマがよく使用する一般的なコマンドのライブラリが用意されています。コマンドライブラリを構成するクラスは、FieldsEditingCommands、CalendarCommands、ControlNavigationCommands です。また、一部のコマンドは一部のコントロールクラスで定義されています。
InputMan の多くのコントロールには、コマンドライブラリにある一部のコマンドのサポートが組み込まれています。 たとえば、GrapeCity.Windows.InputMan.GcTextBox では、System.Windows.Input.ApplicationCommands.Paste、System.Windows.Input.ApplicationCommands.Copy、System.Windows.Input.ApplicationCommands.Cut、System.Windows.Input.ApplicationCommands.Undo などの多くのアプリケーション編集コマンドがサポートされます。アプリケーション開発者は、コントロールで使用するこれらのコマンドを取得するのに特別な作業を行う必要はありません。コマンドが実行したときに GrapeCity.Windows.InputMan.GcTextBox がコマンドターゲットの場合は、コントロールに組み込まれている System.Windows.Input.CommandBinding を使用してコマンドが処理されます。
次は、System.Windows.Input.KeyBinding がコマンドのターゲットである GrapeCity.Windows.InputMan.GcDateTime で定義されたコマンドに対して GrapeCity.Windows.InputMan.GcDateTime をコマンドソースとして使用する方法を示します。GrapeCity.Windows.InputMan.GcDateTime が操作を実行する方法を定義するすべてのロジックは、GrapeCity.Windows.InputMan.GcDateTime コントロールに組み込まれています。
System.Object
   GrapeCity.Wpf.SpreadSheet.CellType.Editors.FieldsEditingCommands