Class MudMask
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
A text input which conforms user input to a specific format while typing.
public class MudMask : MudBaseInput<string>, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IFormComponent, IAsyncDisposable
- Inheritance
-
MudMask
- Implements
- Inherited Members
- Extension Methods
Constructors
MudMask()
public MudMask()
Properties
AdornmentClassname
protected string AdornmentClassname { get; }
Property Value
ChildContent
The content within this input.
[Parameter]
[Category("Appearance")]
public RenderFragment? ChildContent { get; set; }
Property Value
Remarks
Classname
protected string Classname { get; }
Property Value
ClearButtonClassname
protected string ClearButtonClassname { get; }
Property Value
ClearIcon
The icon displayed when Clearable is true
.
[Parameter]
[Category("Appearance")]
public string ClearIcon { get; set; }
Property Value
Clearable
Shows the clear button.
[Parameter]
[Category("List behavior")]
public bool Clearable { get; set; }
Property Value
InputClassname
protected string InputClassname { get; }
Property Value
InputType
The type of the underlying input.
[Parameter]
[Category("List appearance")]
public InputType InputType { get; set; }
Property Value
Remarks
Defaults to Text.
Mask
The mask to apply to text values.
[Parameter]
[Category("Data")]
public IMask Mask { get; set; }
Property Value
Remarks
Typically set to common masks such as PatternMask, MultiMask, RegexMask, and BlockMask. When set, some properties will be ignored such as MaxLines, AutoGrow, and HideSpinButtons.
OnClearButtonClick
Occurs when the clear button is clicked.
[Parameter]
[Category("List appearance")]
public EventCallback<MouseEventArgs> OnClearButtonClick { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
Clear()
Clears the text and value for this input.
public Task Clear()
Returns
DisposeAsyncCore()
Called to dispose this instance.
protected override ValueTask DisposeAsyncCore()
Returns
FocusAsync()
Sets the cursor to this input.
public override ValueTask FocusAsync()
Returns
HandleKeyDown(KeyboardEventArgs)
protected Task HandleKeyDown(KeyboardEventArgs e)
Parameters
Returns
OnAfterRenderAsync(bool)
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
bool
Returns
OnBlurredAsync(FocusEventArgs)
protected override Task OnBlurredAsync(FocusEventArgs obj)
Parameters
obj
FocusEventArgs
Returns
OnInitializedAsync()
protected override Task OnInitializedAsync()
Returns
OnSelect(int, int)
Occurs when the selected characters have changed.
public void OnSelect(int start, int end)
Parameters
start
intThe index of the first selected character.
end
intThe index of the last selected character.
SelectAsync()
Selects the text in this input.
public override ValueTask SelectAsync()
Returns
SelectRangeAsync(int, int)
Selects a range of characters in this input.
public override ValueTask SelectRangeAsync(int pos1, int pos2)
Parameters
pos1
intThe index of the first character to select.
pos2
intThe index of the last character to select.
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