ComponentOne Basic Library for UWP
Basic Library Overview / Input for UWP / Working with Input for UWP / Working with C1MaskTextBox / Mask Formatting / Literals
In This Topic
    Literals
    In This Topic

    In addition to the mask elements defined in the Mask Formatting topic, other characters can be included in the mask. These characters are literals. Literals are non-mask elements that will appear as themselves within C1MaskedTextBox. Literals always occupy a static position in the mask at run time, and cannot be moved or deleted by the user.

    For example, if the C1MaskedTextBox.Mask property has been set to "(999)-000-0000" to define a phone number, the mask characters include the "9" and "0" elements. The remaining characters, the dashes and parentheses, are literals. These characters will appear as they in the C1MaskedTextBox control.

    Note that the C1MaskedTextBox.TextMaskFormat property must be set to IncludeLiterals or IncludePromptAndLiterals for literals to be used. If you do not want literals to be used, set C1MaskedTextBox.TextMaskFormat to IncludePrompt or ExcludePromptAndLiterals.

    See Also