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


In This Topic
    GcDropDownCalculator Class
    In This Topic
    Represents a GcDropDownCalculator control which could perform calculation operations like addition, subtraction, multiplication, and division.
    Object Model
    GcDropDownCalculator Class
    Syntax
    'Declaration
     
    <DesignTimeVisibleAttribute(False)>
    <LicenseProviderAttribute(GrapeCity.Common.SpreadLicenseProvider)>
    <StyleTypedPropertyAttribute(Property="EditButtonStyle", StyleTargetType=GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalculatorButton)>
    <TemplateVisualStateAttribute(Name="Disabled", GroupName="CommonStates")>
    <XmlLangPropertyAttribute("Language")>
    <UsableDuringInitializationAttribute(True)>
    <RuntimeNamePropertyAttribute("Name")>
    <UidPropertyAttribute("Uid")>
    <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
    <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
    Public Class GcDropDownCalculator 
       Inherits ControlBase
    'Usage
     
    Dim instance As GcDropDownCalculator
    [DesignTimeVisible(false)]
    [LicenseProvider(GrapeCity.Common.SpreadLicenseProvider)]
    [StyleTypedProperty(Property="EditButtonStyle", StyleTargetType=GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalculatorButton)]
    [TemplateVisualState(Name="Disabled", GroupName="CommonStates")]
    [XmlLangProperty("Language")]
    [UsableDuringInitialization(true)]
    [RuntimeNameProperty("Name")]
    [UidProperty("Uid")]
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public class GcDropDownCalculator : ControlBase 
    Remarks

    A GcDropDownCalculator control can be used on its own, or as a drop-down part of a GrapeCity.Windows.InputMan.GcNumber control. For more information, see GrapeCity.Windows.InputMan.GcNumber.

    The GcDropDownCalculator control provides calculation using either the mouse or keyboard. You could click the button in the control or press keys to perform calculation. The following table summarizes keyboard operations.

    Key Combination Calculator Operation
    Esc, Ctrl+Delete GrapeCity.Windows.InputMan.CalculatorOperation.C. Clears the current calculation.
    Delete GrapeCity.Windows.InputMan.CalculatorOperation.CE. Clears the displayed number.
    Back GrapeCity.Windows.InputMan.CalculatorOperation.Backspace. Deletes the last digit of the displayed number.
    D0, NumPad0 GrapeCity.Windows.InputMan.CalculatorOperation.Digit0. Puts this number in the calculator display.
    D1, NumPad1 GrapeCity.Windows.InputMan.CalculatorOperation.Digit1. Puts this number in the calculator display.
    D2, NumPad2 GrapeCity.Windows.InputMan.CalculatorOperation.Digit2. Puts this number in the calculator display.
    D3, NumPad3 GrapeCity.Windows.InputMan.CalculatorOperation.Digit3. Puts this number in the calculator display.
    D4, NumPad4 GrapeCity.Windows.InputMan.CalculatorOperation.Digit4. Puts this number in the calculator display.
    D5, NumPad5 GrapeCity.Windows.InputMan.CalculatorOperation.Digit5. Puts this number in the calculator display.
    D6, NumPad6 GrapeCity.Windows.InputMan.CalculatorOperation.Digit6. Puts this number in the calculator display.
    D7, NumPad7 GrapeCity.Windows.InputMan.CalculatorOperation.Digit7. Puts this number in the calculator display.
    D8, NumPad8 GrapeCity.Windows.InputMan.CalculatorOperation.Digit8. Puts this number in the calculator display.
    D9, NumPad9 GrapeCity.Windows.InputMan.CalculatorOperation.Digit9. Puts this number in the calculator display.
    Decimal, OemComma, OemPeriod GrapeCity.Windows.InputMan.CalculatorOperation.DecimalPoint. Inserts a decimal point.
    F9 GrapeCity.Windows.InputMan.CalculatorOperation.Sign. Changes the sign of the displayed number.
    Add, Shift+OemPlus GrapeCity.Windows.InputMan.CalculatorOperation.Add. Adds.
    Subtract, Shift+OemMinus GrapeCity.Windows.InputMan.CalculatorOperation.Subtract. Subtracts.
    Multiply, Shift+Oem1 GrapeCity.Windows.InputMan.CalculatorOperation.Multiply. Multiplies.
    Divide, OemQuestion GrapeCity.Windows.InputMan.CalculatorOperation.Divide. Divides.
    Shift+D5 GrapeCity.Windows.InputMan.CalculatorOperation.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 GrapeCity.Windows.InputMan.CalculatorOperation.SquareRoot. Calculates the square root of the displayed number.
    R GrapeCity.Windows.InputMan.CalculatorOperation.Reciprocal. Calculates the reciprocal of the displayed number.
    Return, Shift+OemMinus GrapeCity.Windows.InputMan.CalculatorOperation.Equal. Performs any operation on the previous two numbers. To repeat the last operation, click = again.
    Ctrl+L GrapeCity.Windows.InputMan.CalculatorOperation.MemoryClear. Clears any number stored in memory.
    Ctrl+R GrapeCity.Windows.InputMan.CalculatorOperation.MemoryRecall. Recalls the number stored in memory. The number remains in memory.
    Ctrl+M GrapeCity.Windows.InputMan.CalculatorOperation.MemorySave. Stores the displayed number in memory.
    Ctrl+P GrapeCity.Windows.InputMan.CalculatorOperation.MemoryPlus. Adds the displayed number to any number already in memory but does not display the sum of these numbers.
    Ctrl+Q GrapeCity.Windows.InputMan.CalculatorOperation.MemoryMinus. Subtracts the displayed number from any number already in memory but does not display the result of the subtraction.

    Supported System.Windows.VisualState list:

    VisualStateGroup Name

    VisualState Name

    Description

    CommonStates

    Normal

    Represents the visual appearance when control is in normal state.

    CommonStates

    Disabled

    Represents the visual appearance when System.Windows.UIElement.IsEnabled is false.

    CalculationStates

    HasErrors

    Represents the visual appearance when HasError is true.

    CalculationStates

    Empty

    Represents the visual appearance when HasError is false.

    ValidationStates

    Valid

    Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns false.

    ValidationStates

    InvalidFocused

    Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns true and System.Windows.UIElement.IsKeyboardFocused is true.

    ValidationStates

    InvalidUnfocused

    Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns true and System.Windows.UIElement.IsKeyboardFocused is false.

    Inheritance Hierarchy

    System.Object
       System.Windows.Threading.DispatcherObject
          System.Windows.DependencyObject
             System.Windows.Media.Visual
                System.Windows.UIElement
                   System.Windows.FrameworkElement
                      System.Windows.Controls.Control
                         GrapeCity.Wpf.SpreadSheet.CellType.Editors.ControlBase
                            GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDropDownCalculator

    See Also