Click or drag to resize

NumericStepperDecimalPlaces Property

Gets or sets the number of digits to display after the decimal.

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public int DecimalPlaces { get; set; }

Property Value

Type: Int32
The number of decimal places to always show.
Remarks
The NumericStepper control will at least show the number of fraction digits as specified by this value, padded by zeros. The MaximumDecimalPlaces specifies the maximum number of fraction digits the control will display if the value has a value that can be represented by more digits. The Value property is rounded to the number of fraction digits specified by MaximumDecimalPlaces. Note that this does not apply if you have specified FormatString
Examples
This shows the effect of the DecimalPlaces and MaximumDecimalPlaces on the display of the control and its returned value.
            var numeric = new NumericStepper();
            
            numeric.DecimalPlaces = 2;
            numeric.MaximumDecimalPlaces = 4;
            
            numeric.Value = 123;         // control will display "123.00"
            numeric.Value = 123.45;      // control will display "123.45"
            numeric.Value = 123.4567;    // control will display "123.4567"
            numeric.Value = 123.4567890; // control will display "123.4568"
            
See Also