Class MBNumericDecimalField
A Material Theme numeric input field. This wraps MBTextField and normally displays the numeric value as formatted text, but switches to a pure number on being selected.
Implements
Inherited Members
Namespace: Material.Blazor
Assembly: Material.Blazor.dll
Syntax
public class MBNumericDecimalField : InputComponent<decimal>, IDisposable
Properties
| Improve this Doc View SourceDecimalPlaces
Number of decimal places for the value. If more dp are entered the value gets rounded properly.
Declaration
public uint DecimalPlaces { get; set; }
Property Value
Type | Description |
---|---|
UInt32 |
Density
The numeric field's density.
Declaration
public MBDensity? Density { get; set; }
Property Value
Type | Description |
---|---|
Nullable<MBDensity> |
FocusedMagnitude
Adjusts the value's maginitude as a number when the field is focused. Used for percentages and basis points (the latter of which lacks appropriate Numeric Format in C#: this issue may not get solved.
Declaration
public MBNumericInputMagnitude FocusedMagnitude { get; set; }
Property Value
Type | Description |
---|---|
MBNumericInputMagnitude |
HelperText
Helper text that is displayed either with focus or persistently with HelperTextPersistent.
Declaration
public string HelperText { get; set; }
Property Value
Type | Description |
---|---|
String |
HelperTextPersistent
Makes the HelperText persistent if true.
Declaration
public bool HelperTextPersistent { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IconFoundry
The foundry to use for both leading and trailing icons.
IconFoundry="IconHelper.MIIcon()"
IconFoundry="IconHelper.FAIcon()"
IconFoundry="IconHelper.OIIcon()"
Overrides IconFoundryName
Declaration
public IMBIconFoundry IconFoundry { get; set; }
Property Value
Type | Description |
---|---|
IMBIconFoundry |
Label
Field label.
Declaration
public string Label { get; set; }
Property Value
Type | Description |
---|---|
String |
LeadingIcon
The leading icon's name. No leading icon shown if not set.
Declaration
public string LeadingIcon { get; set; }
Property Value
Type | Description |
---|---|
String |
Max
The maximum allowable value.
Declaration
public decimal? Max { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Decimal> |
Min
The minimum allowable value.
Declaration
public decimal? Min { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Decimal> |
NumericFormat
Format to apply to the numeric value when the field is not selected.
Declaration
public string NumericFormat { get; set; }
Property Value
Type | Description |
---|---|
String |
NumericSingularFormat
Alternative format for a singular number if required. An example is "1 month" vs "3 months".
Declaration
public string NumericSingularFormat { get; set; }
Property Value
Type | Description |
---|---|
String |
Prefix
Prefix text.
Declaration
public string Prefix { get; set; }
Property Value
Type | Description |
---|---|
String |
Suffix
Suffix text.
Declaration
public string Suffix { get; set; }
Property Value
Type | Description |
---|---|
String |
TextInputStyle
The text input style.
Overrides TextInputStyle
Declaration
public MBTextInputStyle? TextInputStyle { get; set; }
Property Value
Type | Description |
---|---|
Nullable<MBTextInputStyle> |
TrailingIcon
The trailing icon's name. No leading icon shown if not set.
Declaration
public string TrailingIcon { get; set; }
Property Value
Type | Description |
---|---|
String |
UnfocusedMagnitude
Adjusts the value's maginitude as a number when the field is unfocused. Used for percentages and basis points (the latter of which lacks appropriate Numeric Format in C#: this issue may not get solved.
Declaration
public MBNumericInputMagnitude UnfocusedMagnitude { get; set; }
Property Value
Type | Description |
---|---|
MBNumericInputMagnitude |
ValidationMessageFor
Delivers Material Theme validation methods from native Blazor validation. Either use this or the Blazor
ValidationMessage
component, but not both. This parameter takes the same input as
ValidationMessage
's For
parameter.
Declaration
public Expression<Func<object>> ValidationMessageFor { get; set; }
Property Value
Type | Description |
---|---|
Expression<Func<Object>> |
Methods
| Improve this Doc View SourceOnInitializedAsync()
Declaration
protected override async Task OnInitializedAsync()
Returns
Type | Description |
---|---|
Task |