Class MudRangeInput<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
A component for collecting start and end values which define a range.
public class MudRangeInput<T> : MudBaseInput<Range<T>>, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IFormComponent, IAsyncDisposable
Type Parameters
T
The type of object managed by this input.
- Inheritance
-
MudBaseInput<Range<T>>MudRangeInput<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
MudRangeInput()
Creates a new instance.
public MudRangeInput()
Properties
AdornmentClassname
protected string AdornmentClassname { get; }
Property Value
ChildContent
The content within this input component.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
Remarks
Classname
protected string Classname { get; }
Property Value
ClearButtonClassname
protected string ClearButtonClassname { get; }
Property Value
Clearable
Shows a button at the end of the input to clear the value.
[Parameter]
public bool Clearable { get; set; }
Property Value
Remarks
Defaults to false
.
InputClassname
protected string InputClassname { get; }
Property Value
InputType
The type of input collected by this component.
[Parameter]
public InputType InputType { get; set; }
Property Value
Remarks
Defaults to Text. Represents a valid HTML5 input type.
InputTypeString
protected string InputTypeString { get; }
Property Value
OnClearButtonClick
Occurs when the Clear button is clicked.
[Parameter]
public EventCallback<MouseEventArgs> OnClearButtonClick { get; set; }
Property Value
Remarks
PlaceholderEnd
The hint displayed before the user enters an ending value.
[Parameter]
public string? PlaceholderEnd { get; set; }
Property Value
PlaceholderStart
The hint displayed before the user enters a starting value.
[Parameter]
public string? PlaceholderStart { get; set; }
Property Value
SeparatorIcon
The icon shown in between start and end values.
[Parameter]
public string SeparatorIcon { get; set; }
Property Value
Remarks
Defaults to ArrowRightAlt.
TextEnd
The text of the end of the range.
public string? TextEnd { get; set; }
Property Value
TextStart
The text of the start of the range.
public string? TextStart { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
ClearButtonClickHandlerAsync(MouseEventArgs)
protected virtual Task ClearButtonClickHandlerAsync(MouseEventArgs e)
Parameters
Returns
FocusEndAsync()
Moves the cursor to the ending input component.
public ValueTask FocusEndAsync()
Returns
FocusStartAsync()
Moves the cursor to the starting input component.
public ValueTask FocusStartAsync()
Returns
IsClearable()
protected bool IsClearable()
Returns
SelectEndAsync()
Selects the text in the ending input.
public ValueTask SelectEndAsync()
Returns
SelectRangeEndAsync(int, int)
Selects the text in the end value.
public ValueTask SelectRangeEndAsync(int pos1, int pos2)
Parameters
pos1
intThe index of the first character to select.
pos2
intThe index of the last character to select.
Returns
SelectRangeStartAsync(int, int)
Selects the text in the start value.
public ValueTask SelectRangeStartAsync(int pos1, int pos2)
Parameters
pos1
intThe index of the first character to select.
pos2
intThe index of the last character to select.
Returns
SelectStartAsync()
Selects the text in the starting input.
public ValueTask SelectStartAsync()
Returns
UpdateTextPropertyAsync(bool)
Occurs when the value has changed internally.
protected override Task UpdateTextPropertyAsync(bool updateValue)
Parameters
updateValue
bool
Returns
Remarks
UpdateValuePropertyAsync(bool)
Occurs when the value has changed internally.
protected override Task UpdateValuePropertyAsync(bool updateText)
Parameters
updateText
bool