Table of Contents

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

int

Mask

The characters which define the accepted input.

string Mask { get; }

Property Value

string

Selection

The start and end range of selected characters.

(int, int)? Selection { get; set; }

Property Value

(int, int)?

Text

The current text displayed in the input, including delimiter and placeholder characters.

string Text { get; }

Property Value

string

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

string

Insert(string)

Inserts text at the current cursor position.

void Insert(string input)

Parameters

input string

The characters to insert.

SetText(string)

Overwrites the text without losing the cursor position.

void SetText(string text)

Parameters

text string

The text to set.

UpdateFrom(IMask)

Copies the mask and mask characters from the specified mask.

void UpdateFrom(IMask other)

Parameters

other IMask

The mask to copy from.