NumberInputTValue Class

Blazor Bootstrap NumberInputTValue> component is built around HTML input of type="number" that prevents the user input based on the parameters set.

Definition

Namespace: BlazorBootstrap
Assembly: BlazorBootstrap (in BlazorBootstrap.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
public sealed class NumberInput<TValue> : BlazorBootstrapComponentBase
where TValue : struct, new(), INumber<TValue>
Inheritance
Object    ComponentBase    BlazorBootstrapComponentBase    NumberInputTValue

Type Parameters

TValue
Signed number type that contains the value

Constructors

NumberInputTValueInitializes a new instance of the NumberInputTValue class

Properties

AllowNegativeNumbers If , allows negative numbers.
Disabled Gets or sets the disabled state .
EnableMinMax Determines whether to restrict the user input to Min and Max range. If , restricts the user input between the Min and Max range. Else accepts the user input.
Locale Gets or sets the locale. Default locale is 'en-US'.
Max Gets or sets the max. Max ignored if EnableMinMax="false".
Min Gets or sets the min. Min ignored if EnableMinMax="false".
Placeholder Gets or sets the placeholder.
Step The amount the number will increment or decrement by when the user clicks the up or down arrows.
TextAlignment Gets or sets the text alignment.
Value Gets or sets the value.
ValueChanged This event fired on every user keystroke that changes the NumberInput value.
ValueExpression An expression that identifies the bound value.

Methods

Disable Disables number input.
Enable Enables number input.
SetParametersAsync Parameters are loaded manually for sake of performance; if we were to use System.Reflection magic, it would hurt performance if components were used in large numbers.
(Overrides ComponentBaseSetParametersAsync(ParameterView))

Exceptions

InvalidOperationExceptionThrown if TValue isn't a number or is an unsigned number, which is illegal.
InvalidOperationExceptionThrown if Min is larger than Max and EnableMinMax is

See Also