Class RadzenMask
RadzenMask component.
Inheritance
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenMask : FormComponentWithAutoComplete<string>, IDisposable, IRadzenFormComponent
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
public string CharacterPattern { get; set; }
Property Value
Type | Description |
---|---|
System.String | The valid characters pattern. |
Mask
Gets or sets the mask.
Declaration
public string Mask { get; set; }
Property Value
Type | Description |
---|---|
System.String | The mask. |
MaxLength
Gets or sets the maximum length.
Declaration
public long? MaxLength { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | The maximum length. |
Pattern
Gets or sets the pattern that will be used to replace all invalid characters with regular expression.
Declaration
public string Pattern { get; set; }
Property Value
Type | Description |
---|---|
System.String | The invalid characters pattern. |
ReadOnly
Gets or sets a value indicating whether is read only.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |
Overrides
OnAfterRender(Boolean)
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
OnChange(ChangeEventArgs)
Handles the Change event.
Declaration
protected async System.Threading.Tasks.Task OnChange(ChangeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
ChangeEventArgs | args | The |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |