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


In This Topic
    GcNumber Class
    In This Topic
    Represents a number editor control that can input a number or calculate from dropdown calculator.
    Object Model
    GcNumber Class
    Syntax
    'Declaration
     
    <DesignTimeVisibleAttribute(False)>
    <StyleTypedPropertyAttribute(Property="DropDownButtonStyle", StyleTargetType=GrapeCity.Wpf.SpreadSheet.CellType.Editors.DropDownButton)>
    <TemplatePartAttribute(Name="PART_Popup", Type=GrapeCity.Wpf.SpreadSheet.CellType.Editors.DropDownWindow)>
    <TemplateVisualStateAttribute(Name="ActiveDropDown", GroupName="ActiveStates")>
    <LicenseProviderAttribute(GrapeCity.Common.SpreadLicenseProvider)>
    <LocalizabilityAttribute(LocalizationCategory.Text)>
    <XmlLangPropertyAttribute("Language")>
    <UsableDuringInitializationAttribute(True)>
    <RuntimeNamePropertyAttribute("Name")>
    <UidPropertyAttribute("Uid")>
    <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
    <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
    Public Class GcNumber 
       Inherits FieldsEditorControl
    'Usage
     
    Dim instance As GcNumber
    [DesignTimeVisible(false)]
    [StyleTypedProperty(Property="DropDownButtonStyle", StyleTargetType=GrapeCity.Wpf.SpreadSheet.CellType.Editors.DropDownButton)]
    [TemplatePart(Name="PART_Popup", Type=GrapeCity.Wpf.SpreadSheet.CellType.Editors.DropDownWindow)]
    [TemplateVisualState(Name="ActiveDropDown", GroupName="ActiveStates")]
    [LicenseProvider(GrapeCity.Common.SpreadLicenseProvider)]
    [Localizability(LocalizationCategory.Text)]
    [XmlLangProperty("Language")]
    [UsableDuringInitialization(true)]
    [RuntimeNameProperty("Name")]
    [UidProperty("Uid")]
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public class GcNumber : FieldsEditorControl 
    Remarks

    The GcNumber control provides number input for positive and negative values and allows you to design a functional numeric input interface quickly and efficiently. During data entry, the user can press the minus sign ("-") at any time to toggle the value between positive and negative. Also, the plus sign ("+") will change a negative value to positive.

    GcNumber control can set its own FieldSet property an NumberFieldSet value to use different digits patterns, different sign strings and different separator char. You can use the format to limit user's input behavior. Besides, you can limit the range of value by setting the MaxValue and MinValue property.

    GcNumber control support display fields. You can set a new NumberDisplayFieldSet property or change its own content. Then GcNumber can change its display text when control lost keyboard focus.

    User can open the dropdown calculator to operate an calculation easily. You can define the dropdown calculaotr's view and behavior by set DropDownCalculatorStyle property.

    Supported System.Windows.VisualState list:

    l

    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.

    CommonStates

    ReadOnly

    Represents the visual appearance when IsReadOnly is true.

    CommonStates

    MouseOver

    Represents the visual appearance when System.Windows.UIElement.IsMouseOver is true.

    ActiveStates

    ActiveDropDown

    Represents the visual appearance when IsActive and IsDropDownOpen is true.

    ActiveStates

    Active

    Represents the visual appearance when IsActive is true.

    ActiveStates

    Inactive

    Represents the visual appearance when IsActive is false.

    InputStates

    Full

    Represents the visual appearance when FieldsEditorControl.IsFull is true.

    InputStates

    Completed

    Represents the visual appearance when FieldsEditorControl.IsCompleted is true.

    InputStates

    Empty

    Represents the visual appearance when FieldsEditorControl.IsEmpty is true.

    InputStates

    Part

    Represents the visual appearance when FieldsEditorControl.IsFull, FieldsEditorControl.IsCompleted and FieldsEditorControl.IsEmpty all are false.

    SignStates

    Negative

    Represents the visual appearance when SignState is GrapeCity.Windows.InputMan.SignState.Negative.

    SignStates

    Positive

    Represents the visual appearance when SignState is GrapeCity.Windows.InputMan.SignState.Positive.

    SignStates

    NoSign

    Represents the visual appearance when SignState return GrapeCity.Windows.InputMan.SignState.None.

    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 control has focus.

    ValidationStates

    InvalidUnfocused

    Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns true and control has no focus.

    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.EditBase
                               GrapeCity.Wpf.SpreadSheet.CellType.Editors.FieldsEditorControl
                                  GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcNumber

    See Also