Class MaskedTextBoxBuilder
Inheritance
System.Object
MaskedTextBoxBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class MaskedTextBoxBuilder : ControlBuilder
Constructors
MaskedTextBoxBuilder()
Declaration
public MaskedTextBoxBuilder()
MaskedTextBoxBuilder(MaskedTextBox)
Declaration
public MaskedTextBoxBuilder(MaskedTextBox model)
Parameters
Fields
model
Declaration
public MaskedTextBox model
Field Value
Properties
HtmlAttr
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
ID
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Output
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
Blur(String)
Triggers when the MaskedTextBox got focus out.
Declaration
public MaskedTextBoxBuilder Blur(string blur)
Parameters
Type |
Name |
Description |
System.String |
blur |
|
Returns
Change(String)
Triggers when the value of the MaskedTextBox changes.
Declaration
public MaskedTextBoxBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
Created(String)
Triggers when the MaskedTextBox component is created.
Declaration
public MaskedTextBoxBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
CssClass(String)
Gets or sets the CSS classes to root element of the MaskedTextBox which helps to customize the
complete UI styles for the MaskedTextBox component.
Declaration
public MaskedTextBoxBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
CustomCharacters(Object)
Sets the collection of values to be mapped for non-mask elements(literals)
which have been set in the mask of MaskedTextBox.
In the below example, non-mask elements "P" accepts values
"P" , "A" , "p" , "a" and "M" accepts values "M", "m" mentioned in the custom characters collection.
For more information on customCharacters, refer to
customCharacters.
{% codeBlock src='maskedtextbox/customCharacters/index.md' %}{% endcodeBlock %}
Declaration
public MaskedTextBoxBuilder CustomCharacters(object customCharacters)
Parameters
Type |
Name |
Description |
System.Object |
customCharacters |
|
Returns
Destroyed(String)
Triggers when the MaskedTextBox component is destroyed.
Declaration
public MaskedTextBoxBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Enabled(Boolean)
Sets a value that enables or disables the MaskedTextBox component.
Declaration
public MaskedTextBoxBuilder Enabled(bool enabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnablePersistence(Boolean)
Sets a value that enables or disables the persisting state of the MaskedTextBox after reloading the page.
If enabled, the 'value' state will be persisted.
Declaration
public MaskedTextBoxBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
EnableRtl(Boolean)
Enable or disable rendering component in right to left direction.
Declaration
public MaskedTextBoxBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
FloatLabelType(FloatLabelType)
The acts as a label
and floats above the MaskedTextBox based on the below values.
Possible values are:
Never - The floating label will not be enable when the placeholder is available.
Always - The floating label always floats above the MaskedTextBox.
Auto - The floating label floats above the MaskedTextBox after focusing it or when enters the value in it.
Declaration
public MaskedTextBoxBuilder FloatLabelType(FloatLabelType floatLabelType)
Parameters
Returns
Focus(String)
Triggers when the MaskedTextBox got focus in.
Declaration
public MaskedTextBoxBuilder Focus(string focus)
Parameters
Type |
Name |
Description |
System.String |
focus |
|
Returns
HtmlAttributes(Object)
You can add the additional html attributes such as disabled, value etc., to the element.
If you configured both property and equivalent html attribute then the component considers the property value.
{% codeBlock src='maskedtextbox/htmlAttributes/index.md' %}{% endcodeBlock %}
Declaration
public MaskedTextBoxBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
Locale(String)
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public MaskedTextBoxBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
Mask(String)
Sets a value that masks the MaskedTextBox to allow/validate the user input.
Mask allows standard mask elements
as mask
elements.
For more information on mask, refer to
mask.
If the mask value is empty, the MaskedTextBox will behave as an input element with text type.
Declaration
public MaskedTextBoxBuilder Mask(string mask)
Parameters
Type |
Name |
Description |
System.String |
mask |
|
Returns
Placeholder(String)
Gets or sets the string shown as a hint/placeholder when the MaskedTextBox is empty.
It acts as a label and floats above the MaskedTextBox based on the
Declaration
public MaskedTextBoxBuilder Placeholder(string placeholder)
Parameters
Type |
Name |
Description |
System.String |
placeholder |
|
Returns
PromptChar(String)
Gets or sets a value that will be shown as a prompting symbol for the masked value.
The symbol used to show input positions in the MaskedTextBox.
For more information on prompt-character, refer to
prompt-character.
Declaration
public MaskedTextBoxBuilder PromptChar(string promptChar)
Parameters
Type |
Name |
Description |
System.String |
promptChar |
|
Returns
Readonly(Boolean)
Declaration
public MaskedTextBoxBuilder Readonly(bool readOnly = true)
Parameters
Type |
Name |
Description |
System.Boolean |
readOnly |
|
Returns
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
ShowClearButton(Boolean)
Specifies whether to show or hide the clear icon.
Declaration
public MaskedTextBoxBuilder ShowClearButton(bool showClearButton = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showClearButton |
|
Returns
Value(String)
Gets or sets the value of the MaskedTextBox. It is a raw value of the MaskedTextBox excluding literals
and prompt characters. By using getMaskedValue
property, you can get the value of MaskedTextBox with the masked format.
{% codeBlock src='maskedtextbox/value/index.md' %}{% endcodeBlock %}
Declaration
public MaskedTextBoxBuilder Value(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Width(Double)
Sets the width of the MaskedTextBox.
Declaration
public MaskedTextBoxBuilder Width(double width)
Parameters
Type |
Name |
Description |
System.Double |
width |
|
Returns
Width(String)
Sets the width of the MaskedTextBox.
Declaration
public MaskedTextBoxBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns