menu

ASP.NET Core - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MaskedTextBoxBuilder - API Reference

    Show / Hide Table of Contents

    Class MaskedTextBoxBuilder

    Inheritance
    System.Object
    ControlBuilder
    MaskedTextBoxBuilder
    Inherited Members
    ControlBuilder.Context
    Namespace: Syncfusion.EJ2.Inputs
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class MaskedTextBoxBuilder : ControlBuilder

    Constructors

    MaskedTextBoxBuilder()

    Declaration
    public MaskedTextBoxBuilder()

    MaskedTextBoxBuilder(MaskedTextBox)

    Declaration
    public MaskedTextBoxBuilder(MaskedTextBox model)
    Parameters
    Type Name Description
    MaskedTextBox model

    Fields

    model

    Declaration
    public MaskedTextBox model
    Field Value
    Type Description
    MaskedTextBox

    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
    ControlBuilder.Output

    Methods

    Blur(String)

    Triggers when the MaskedTextBox got focus out.

    Declaration
    public MaskedTextBoxBuilder Blur(string blur)
    Parameters
    Type Name Description
    System.String blur
    Returns
    Type Description
    MaskedTextBoxBuilder

    Change(String)

    Triggers when the value of the MaskedTextBox changes.

    Declaration
    public MaskedTextBoxBuilder Change(string change)
    Parameters
    Type Name Description
    System.String change
    Returns
    Type Description
    MaskedTextBoxBuilder

    Created(String)

    Triggers when the MaskedTextBox component is created.

    Declaration
    public MaskedTextBoxBuilder Created(string created)
    Parameters
    Type Name Description
    System.String created
    Returns
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    Destroyed(String)

    Triggers when the MaskedTextBox component is destroyed.

    Declaration
    public MaskedTextBoxBuilder Destroyed(string destroyed)
    Parameters
    Type Name Description
    System.String destroyed
    Returns
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Name Description
    FloatLabelType floatLabelType
    Returns
    Type Description
    MaskedTextBoxBuilder

    Focus(String)

    Triggers when the MaskedTextBox got focus in.

    Declaration
    public MaskedTextBoxBuilder Focus(string focus)
    Parameters
    Type Name Description
    System.String focus
    Returns
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    Readonly(Boolean)

    Declaration
    public MaskedTextBoxBuilder Readonly(bool readOnly = true)
    Parameters
    Type Name Description
    System.Boolean readOnly
    Returns
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    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
    Type Description
    MaskedTextBoxBuilder

    Width(Double)

    Sets the width of the MaskedTextBox.

    Declaration
    public MaskedTextBoxBuilder Width(double width)
    Parameters
    Type Name Description
    System.Double width
    Returns
    Type Description
    MaskedTextBoxBuilder

    Width(String)

    Sets the width of the MaskedTextBox.

    Declaration
    public MaskedTextBoxBuilder Width(string width)
    Parameters
    Type Name Description
    System.String width
    Returns
    Type Description
    MaskedTextBoxBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved