Skip to main content

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

MemberSummary
NumericModal()

Properties

MemberSummary
DecimalsDigits kept after the separator. Zero also means a decimal separator cannot be typed at all.
LargeStepHow far the page keys move the value.
PrefixDrawn before the value.
StepHow far the arrow keys move the value.
SuffixDrawn after the value.

Methods

MemberSummary
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()

Obsolete

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

NameTypeDescription
valuedecimalThe 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

NameTypeDescription
valuedecimalThe value to format.

Returns string — The number as text, without affixes.