Table of Contents

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
MudRangeInput<T>
Implements
Inherited Members
Extension Methods

Constructors

MudRangeInput()

Creates a new instance.

public MudRangeInput()

Properties

AdornmentClassname

protected string AdornmentClassname { get; }

Property Value

string

ChildContent

The content within this input component.

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Remarks

Will only display if InputType is Hidden.

Classname

protected string Classname { get; }

Property Value

string

ClearButtonClassname

protected string ClearButtonClassname { get; }

Property Value

string

Clearable

Shows a button at the end of the input to clear the value.

[Parameter]
public bool Clearable { get; set; }

Property Value

bool

Remarks

Defaults to false.

InputClassname

protected string InputClassname { get; }

Property Value

string

InputType

The type of input collected by this component.

[Parameter]
public InputType InputType { get; set; }

Property Value

InputType

Remarks

Defaults to Text. Represents a valid HTML5 input type.

InputTypeString

protected string InputTypeString { get; }

Property Value

string

OnClearButtonClick

Occurs when the Clear button is clicked.

[Parameter]
public EventCallback<MouseEventArgs> OnClearButtonClick { get; set; }

Property Value

EventCallback<MouseEventArgs>

Remarks

When clicked, the Text and Value properties are reset.

PlaceholderEnd

The hint displayed before the user enters an ending value.

[Parameter]
public string? PlaceholderEnd { get; set; }

Property Value

string

PlaceholderStart

The hint displayed before the user enters a starting value.

[Parameter]
public string? PlaceholderStart { get; set; }

Property Value

string

SeparatorIcon

The icon shown in between start and end values.

[Parameter]
public string SeparatorIcon { get; set; }

Property Value

string

Remarks

Defaults to ArrowRightAlt.

TextEnd

The text of the end of the range.

public string? TextEnd { get; set; }

Property Value

string

TextStart

The text of the start of the range.

public string? TextStart { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

ClearButtonClickHandlerAsync(MouseEventArgs)

protected virtual Task ClearButtonClickHandlerAsync(MouseEventArgs e)

Parameters

e MouseEventArgs

Returns

Task

FocusEndAsync()

Moves the cursor to the ending input component.

public ValueTask FocusEndAsync()

Returns

ValueTask

FocusStartAsync()

Moves the cursor to the starting input component.

public ValueTask FocusStartAsync()

Returns

ValueTask

IsClearable()

protected bool IsClearable()

Returns

bool

SelectEndAsync()

Selects the text in the ending input.

public ValueTask SelectEndAsync()

Returns

ValueTask

SelectRangeEndAsync(int, int)

Selects the text in the end value.

public ValueTask SelectRangeEndAsync(int pos1, int pos2)

Parameters

pos1 int

The index of the first character to select.

pos2 int

The index of the last character to select.

Returns

ValueTask

SelectRangeStartAsync(int, int)

Selects the text in the start value.

public ValueTask SelectRangeStartAsync(int pos1, int pos2)

Parameters

pos1 int

The index of the first character to select.

pos2 int

The index of the last character to select.

Returns

ValueTask

SelectStartAsync()

Selects the text in the starting input.

public ValueTask SelectStartAsync()

Returns

ValueTask

UpdateTextPropertyAsync(bool)

Occurs when the value has changed internally.

protected override Task UpdateTextPropertyAsync(bool updateValue)

Parameters

updateValue bool

Returns

Task

Remarks

This method is called when the Text property needs to be refreshed from current Value.

UpdateValuePropertyAsync(bool)

Occurs when the value has changed internally.

protected override Task UpdateValuePropertyAsync(bool updateText)

Parameters

updateText bool

Returns

Task

Remarks

This method is called when the Value property needs to be refreshed from current Text.