ProcessCommand Property
ProcessCommand
Represents the ProcessCommand command, which requests that calculator to process the operation the command parameter describes.
Declaration
public static RoutedUICommand ProcessCommand { get; }
Public Shared ReadOnly Property ProcessCommand As RoutedUICommand
Property Value
Type |
Description |
RoutedUICommand |
The requested command. The default key gestures depends on the command parameter.
Key Combination | Calculator Operation |
---|
Esc, Ctrl+Delete | C. Clears the current calculation. | Delete | CE. Clears the displayed number. | Back | Backspace. Deletes the last digit of the displayed number. | D0, NumPad0 | Digit0. Puts this number in the calculator display. | D1, NumPad1 | Digit1. Puts this number in the calculator display. | D2, NumPad2 | Digit2. Puts this number in the calculator display. | D3, NumPad3 | Digit3. Puts this number in the calculator display. | D4, NumPad4 | Digit4. Puts this number in the calculator display. | D5, NumPad5 | Digit5. Puts this number in the calculator display. | D6, NumPad6 | Digit6. Puts this number in the calculator display. | D7, NumPad7 | Digit7. Puts this number in the calculator display. | D8, NumPad8 | Digit8. Puts this number in the calculator display. | D9, NumPad9 | Digit9. Puts this number in the calculator display. | Decimal, OemComma, OemPeriod | DecimalPoint. Inserts a decimal point. | F9 | Sign. Changes the sign of the displayed number. | Add, Shift+OemPlus | Add. Adds | Subtract, Shift+OemMinus | Subtract. Subtracts. | Multiply, Shift+Oem1 | Multiply. Multiplies. | Divide, OemQuestion | Divide. Divides. | Shift+D5 | Percentage. Displays the result of multiplication as a percentage. Enter one number, click *, enter the second number, and then click %. For example, 50 * 25% will display 12.5. You can also perform operations with percentages. Enter one number, click the operator (+, -, *, or /), enter the second number, click %, and then click =. | OemTilde | SquareRoot. Calculates the square root of the displayed number. | R | Reciprocal. Calculates the reciprocal of the displayed number. | Return, Shift+OemMinus | Equal. Performs any operation on the previous two numbers. To repeat the last operation, click = again. | Ctrl+L | MemoryClear. Clears any number stored in memory. | Ctrl+R | MemoryRecall. Recalls the number stored in memory. The number remains in memory. | Ctrl+M | MemorySave. Stores the displayed number in memory. | Ctrl+P | MemoryPlus. Adds the displayed number to any number already in memory but does not display the sum of these numbers. | Ctrl+Q | MemoryMinus. Subtracts the displayed number from any number already in memory but does not display the result of the subtraction. |
|
Remarks
Examples
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.
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 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 GcDropDownCalculator,
where a GcDropDownCalculator is the target of the command.
All the logic that defines how the GcDropDownCalculator performs the operations is built into the GcDropDownCalculator control.