Class RadzenMask
RadzenMask component.
Inheritance
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenMask : FormComponentWithAutoComplete<string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
Examples
<RadzenMask Mask="(***) ***-****" Pattern="[^0-9]" Placeholder="(000) 000-0000" @bind-Value=@phone Change=@(args => Console.WriteLine($"Value: {args}")) />
Constructors
RadzenMask()
RadzenMask component.
Declaration
public RadzenMask()
Examples
<RadzenMask Mask="(***) ***-****" Pattern="[^0-9]" Placeholder="(000) 000-0000" @bind-Value=@phone Change=@(args => Console.WriteLine($"Value: {args}")) />
Properties
CharacterPattern
Gets or sets the pattern that will be used to match all valid characters with regular expression. If both Pattern and CharacterPattern are set CharacterPattern will be used.
Declaration
[Parameter]
public string CharacterPattern { get; set; }
Property Value
Type | Description |
---|---|
string | The valid characters pattern. |
Mask
Gets or sets the mask.
Declaration
[Parameter]
public string Mask { get; set; }
Property Value
Type | Description |
---|---|
string | The mask. |
MaxLength
Gets or sets the maximum length.
Declaration
[Parameter]
public long? MaxLength { get; set; }
Property Value
Type | Description |
---|---|
long? | The maximum length. |
Pattern
Gets or sets the pattern that will be used to replace all invalid characters with regular expression.
Declaration
[Parameter]
public string Pattern { get; set; }
Property Value
Type | Description |
---|---|
string | The invalid characters pattern. |
ReadOnly
Gets or sets a value indicating whether is read only.
Declaration
[Parameter]
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Methods
BuildRenderTree(RenderTreeBuilder)
RadzenMask component.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | __builder |
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
string |
Overrides
OnAfterRender(bool)
RadzenMask component.
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
bool | firstRender |
Overrides
OnChange(ChangeEventArgs)
Handles the Change event.
Declaration
protected Task OnChange(ChangeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
ChangeEventArgs | args | The ChangeEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Task |