NumericModal class
Namespace: Arlecchino.Modals.Asking · Assembly: Arlecchino
What the number field and the slider have in common: stepping, precision and affixes.
public abstract class NumericModal : Modal, IAffixedModal
Inherits from Modal
Implements IAffixedModal
Derived types NumberModal, SliderModal
Constructors
| Member | Summary |
|---|---|
NumericModal() |
Properties
| Member | Summary |
|---|---|
Decimals | Digits kept after the separator. Zero also means a decimal separator cannot be typed at all. |
LargeStep | How far the page keys move the value. |
Prefix | Drawn before the value. |
Step | How far the arrow keys move the value. |
Suffix | Drawn after the value. |
Methods
| Member | Summary |
|---|---|
Display(decimal) | Formats a value the way the user sees it, affixes included. |
FormatNumber(decimal) | Formats a value with the configured precision, culture-independently. |
Constructors in detail
NumericModal()
Constructors of types with required members are not supported in this version of your compiler.
public NumericModal();
Properties in detail
Decimals
public int Decimals { get; init; }
Digits kept after the separator. Zero also means a decimal separator cannot be typed at all.
Type int
LargeStep
public decimal LargeStep { get; init; }
How far the page keys move the value.
Type decimal
Prefix
public string Prefix { get; init; }
Drawn before the value.
Type string
Step
public decimal Step { get; init; }
How far the arrow keys move the value.
Type decimal
Suffix
public string Suffix { get; init; }
Drawn after the value.
Type string
Methods in detail
Display(decimal)
public string Display(decimal value);
Formats a value the way the user sees it, affixes included.
Parameters
| Name | Type | Description |
|---|---|---|
value | decimal | The value to format. |
Returns string — The number as text, with affixes.
FormatNumber(decimal)
public string FormatNumber(decimal value);
Formats a value with the configured precision, culture-independently.
Parameters
| Name | Type | Description |
|---|---|---|
value | decimal | The value to format. |
Returns string — The number as text, without affixes.