New to Telerik UI for BlazorStart a free 30-day trial

The Telerik Masked TextBox class.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

C#
public class TelerikMaskedTextBox : TextBoxBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikInputBase<string>TextBoxBaseTelerikMaskedTextBox...

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members TextBoxBase.OnParametersSetAsync()TextBoxBase.OnAfterRenderAsync(bool)TextBoxBase.Dispose()TextBoxBase.InitJsComponentAsync()TextBoxBase.UpdateValueDebounced(string)TextBoxBase.TitleTextBoxBase.PlaceholderTextBoxBase.DataSmartPasteDescriptionAttributeTextBoxBase.WidthTextBoxBase.NameTextBoxBase.DebounceDelayTextBoxBase.ReadOnlyTextBoxBase.AutoCapitalizeTextBoxBase.SpellCheckTelerikInputBase<string>.OnInitializedAsync()TelerikInputBase<string>.FocusAsync()TelerikInputBase<string>.CascadedEditContextTelerikInputBase<string>.FloatingLabelTelerikInputBase<string>.IdTelerikInputBase<string>.EnabledTelerikInputBase<string>.TabIndexTelerikInputBase<string>.ValueExpressionTelerikInputBase<string>.ValueChangedTelerikInputBase<string>.ValueTelerikInputBase<string>.OnChangeTelerikInputBase<string>.OnBlurTelerikInputBase<string>.AriaLabelTelerikInputBase<string>.AriaLabelledByTelerikInputBase<string>.AriaDescribedByTelerikInputBase<string>.ValidateOnTelerikInputBase<string>.InputModeBaseComponent.ShouldRender()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)...

Constructors

C#
public TelerikMaskedTextBox()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
protected override Task OnAfterRenderInternalAsync(bool firstRender)
Parameters:firstRenderboolReturns:

Task

Overrides: TextBoxBase.OnAfterRenderInternalAsync(bool)

C#
protected override Task OnParametersSetInternalAsync()
Returns:

Task

Overrides: TextBoxBase.OnParametersSetInternalAsync()

C#
public override Task SetParametersAsync(ParameterView parameters)
Parameters:parametersParameterViewReturns:

Task

Overrides: TelerikInputBase<string>.SetParametersAsync(ParameterView)

Properties

Enables WebMCP tool registration for this MaskedTextBox. When true, MaskedTextBox operations are exposed as tools discoverable by AI models through the browser. Default value is false.

C#
[Parameter]
public bool EnableWebMcpTools { get; set; }

Specifies the fill mode of the MaskedTextBox.

C#
[Parameter]
public override string FillMode { get; set; }

Overrides: TextBoxBase.FillMode

Specifies whether to include literals in the raw value. Defaults to false.

C#
[Parameter]
public bool IncludeLiterals { get; set; }

Represents the current mask. If no mask is set, the component behaves as a standard type="text" input.

C#
[Parameter]
public string Mask { get; set; }

The content of the MaskedTextBox prefix.

C#
[Parameter]
public RenderFragment MaskedTextBoxPrefixTemplate { get; set; }

Provides configuration for WebMCP tools, such as a Name to distinguish this MaskedTextBox from others on the same page.

C#
[Parameter]
public RenderFragment MaskedTextBoxSettings { get; set; }

The content of the MaskedTextBox suffix.

C#
[Parameter]
public RenderFragment MaskedTextBoxSuffixTemplate { get; set; }

Specifies whether the mask should be shown on focus for empty value.

C#
[Parameter]
public bool MaskOnFocus { get; set; }

Represents a prompt character for the masked value. Defaults to "_".

C#
[Parameter]
public char Prompt { get; set; }

Indicates a character which represents an empty position in the raw value. Defaults to " ".

C#
[Parameter]
public char? PromptPlaceholder { get; set; }

Specifies the roundness of the MaskedTextBox.

C#
[Parameter]
public override string Rounded { get; set; }

Overrides: TextBoxBase.Rounded

Specifies whether the clear button should be displayed.

C#
[Parameter]
public bool ShowClearButton { get; set; }

Defines whether the prefix separator should be shown. The default value is true.

C#
[Parameter]
public bool ShowPrefixSeparator { get; set; }

Defines whether the suffix separator should be shown. The default value is true.

C#
[Parameter]
public bool ShowSuffixSeparator { get; set; }

Specifies the Size of the text MaskedTextBox.

C#
[Parameter]
public override string Size { get; set; }

Overrides: TextBoxBase.Size