Interface IMask
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Implements input masking features for a mask.
public interface IMask
- Extension Methods
Properties
CaretPos
The current cursor position.
int CaretPos { get; set; }
Property Value
Mask
The characters which define the accepted input.
string Mask { get; }
Property Value
Selection
The start and end range of selected characters.
(int, int)? Selection { get; set; }
Property Value
Text
The current text displayed in the input, including delimiter and placeholder characters.
string Text { get; }
Property Value
Methods
Backspace()
Triggers a backspace at the current cursor position.
void Backspace()
Remarks
Has the same effect as pressing the Backspace
key.
Clear()
Clears the text and selection.
void Clear()
Delete()
Triggers a delete at the current cursor position.
void Delete()
Remarks
Has the same effect as pressing the Delete
key.
GetCleanText()
The current text in the input, excluding delimiter or placeholder characters.
string GetCleanText()
Returns
Insert(string)
Inserts text at the current cursor position.
void Insert(string input)
Parameters
input
stringThe characters to insert.
SetText(string)
Overwrites the text without losing the cursor position.
void SetText(string text)
Parameters
text
stringThe text to set.
UpdateFrom(IMask)
Copies the mask and mask characters from the specified mask.
void UpdateFrom(IMask other)
Parameters
other
IMaskThe mask to copy from.