[]
Provides a set of FieldsEditorControl related field editing commands.
public static class FieldsEditingCommands
Public Module FieldsEditingCommands
The commands in the FieldsEditingCommands class and commands in the other command library classes, such as ApplicationCommands, are intended to represent a set of common commands that FieldsEditorControl programmers encounter frequently. The commands only represent the instance of the RoutedCommand and not the implementation logic for the command. The implementation logic is bound to the command with a CommandBinding. For example, if the MoveLeftByField command is executed on a IM control, the logic which performs the MoveLeftByField command may not be provided by the IM control, so the application writer will be responsible for writing the logic that determines how the IM control will handle the command.
IM FieldsEditorControl controls (GrapeCity.Windows.InputMan.GcDateTime, GrapeCity.Windows.InputMan.GcMask and GrapeCity.Windows.InputMan.GcNumber) do provide implementation logic for many of the commands in the command library.
Fields Editing Command | Default key gesture |
---|---|
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 |
The following example shows how to hook up a RoutedCommand to an InputMan Control.
InputMan provides a library of commands which application programmers encounter regularly. The classes which comprise the command library are: FieldsEditingCommands, CalendarCommands and ControlNavigationCommands. And some commands are defined in some classes of controls.
Many controls in InputMan do have built in support for some of the commands in the command library. GrapeCity.Windows.InputMan.GcTextBox, for example, supports many of the application edit commands such as Paste, Copy, Cut and Undo. The application developer does not have to do anything special to get these commands to work with these controls. If the GrapeCity.Windows.InputMan.GcTextBox is the command target when the command is executed, it will handle the command using the CommandBinding that is built into the control.
The following shows how to use KeyBinding as the command source for the command defined on GrapeCity.Windows.InputMan.GcDateTime, where a GrapeCity.Windows.InputMan.GcDateTime is the target of the command. All the logic that defines how the GrapeCity.Windows.InputMan.GcDateTime performs the operations is built into the GrapeCity.Windows.InputMan.GcDateTime control.
Name | Description |
---|---|
Clear | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.Clear command, which requests that the all characters would be deleted. |
DeleteNextCharacter | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.DeleteNextCharacter command, which requests that the backward character would be deleted. |
DeleteNextCharactersByField | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.DeleteNextCharactersByField command, which requests that would delete all the backward text on current editable field. |
DeletePreviousCharacter | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.DeletePreviousCharacter command, which requests that the character before the caret be deleted. |
DeletePreviousCharactersByField | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.DeletePreviousCharactersByField command, which requests that all the character before the caret on current field will be deleted. |
MoveLeftByCharacter | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.MoveLeftByCharacter command, which requests that the caret move to previous character on all editable fields. |
MoveLeftByField | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.MoveLeftByField command, which requests that the caret move to the start of preview editable field. |
MoveRightByCharacter | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.MoveRightByCharacter command, which requests that the caret move to next character on the editable field. |
MoveRightByField | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.MoveRightByField command, which requests that the caret move to the start of next editable field. |
MoveToFirst | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.MoveToFirst command, which requests that the caret move to the start of the first editable field. |
MoveToFirstFieldStart | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.MoveToFirstFieldStart command, which requests that the caret move to the start of the first field. |
MoveToLast | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.MoveToLast command, which requests that the caret move to the end of the last editable field. |
MoveToLastFieldEnd | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.MoveToLastFieldEnd command, which requests that the caret move to the end of the last field. |
NextField | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.NextField command, which requests that the caret move to next field on all editable fields. |
NextFieldThenControl | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.NextFieldThenControl command, which requests that the caret move to next field on all editable fields and then move focus out of control. |
PreviousField | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.PreviousField command, which requests that the caret move to previous field on all editable fields. |
PreviousFieldThenControl | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.PreviousFieldThenControl command, which requests that the caret move to previous field on all editable fields and then move focus out of control. |
SelectLeftByCharacter | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.SelectLeftByCharacter command, which requests that the current selection be expanded to preview character. |
SelectLeftByField | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.SelectLeftByField command, which requests that the current selection be extended to the field's start position. |
SelectRightByCharacter | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.SelectRightByCharacter command, which requests that the current selection be expanded to next character. |
SelectRightByField | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.SelectRightByField command, which requests that the current selection be extended to the field's end position. |
SelectToFirst | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.SelectToFirst command, which requests that the current selection be expanded to start of the first editable field. |
SelectToFirstFieldStart | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.SelectToFirstFieldStart command, which requests that the current selection be expanded to the start of first field. |
SelectToLast | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.SelectToLast command, which requests that the current selection be expanded to the end of the last editable field. |
SelectToLastFieldEnd | Represents the GrapeCity.Windows.InputMan.FieldsEditingCommands.SelectToLastFieldEnd command, which requests that the current selection be expanded to the end of the last field. |
SpinDown | Represents the SpinDown command, which requests that value should be decreased. |
SpinUp | Represents the SpinUp command, which requests that value should be increased. |