Spread WPF 18
GrapeCity.Wpf.SpreadSheet.CellType.Editors Namespace / FieldsEditingCommands Class
Members Example


In This Topic
    FieldsEditingCommands Class
    In This Topic
    Provides a set of FieldsEditorControl related field editing commands.
    Object Model
    FieldsEditingCommands Class
    Syntax
    'Declaration
     
    Public MustInherit NotInheritable Class FieldsEditingCommands 
    'Usage
     
    Dim instance As FieldsEditingCommands
    public static class FieldsEditingCommands 
    Remarks

    The commands in the FieldsEditingCommands class and commands in the other command library classes, such as System.Windows.Input.ApplicationCommands, are intended to represent a set of common commands that FieldsEditorControl programmers encounter frequently. The commands only represent the instance of the System.Windows.Input.RoutedCommand and not the implementation logic for the command. The implementation logic is bound to the command with a System.Windows.Input.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
    Example

    The following example shows how to hook up a System.Windows.Input.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 System.Windows.Input.ApplicationCommands.Paste, System.Windows.Input.ApplicationCommands.Copy, System.Windows.Input.ApplicationCommands.Cut and System.Windows.Input.ApplicationCommands.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 System.Windows.Input.CommandBinding that is built into the control.

    The following shows how to use System.Windows.Input.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.

    Inheritance Hierarchy

    System.Object
       GrapeCity.Wpf.SpreadSheet.CellType.Editors.FieldsEditingCommands

    See Also