ClassTokenLocator
Class that manages the Mask Tokens.
Definition
Namespace:Telerik.Windows.Controls.MaskedInput.Tokens
Assembly:Telerik.Windows.Controls.Input.dll
Syntax:
public static class TokenLocator
Inheritance: objectTokenLocator
Methods
AddCustomValidationRule(ITokenValidationRule)
Adds a custom validation rule to the TokenLocator.
Declaration
public static void AddCustomValidationRule(ITokenValidationRule rule)
Parameters
rule
Rule to be added.
Exceptions
Thrown when the rule is null, rule's token is empty or already exists such token.
GetFirstAllowedCharForTokenRule(char, TokenTypes)
Gets the first allowed char of ITokenValidationRule.
Declaration
public static char GetFirstAllowedCharForTokenRule(char character, TokenTypes type)
Parameters
character
Char of the Token.
type
Type of the Rule.
Returns
Returns the first allowed char of ITokenValidationRule. If no rule is found, token char is returned.
GetLastAllowedCharForTokenRule(char, TokenTypes)
Gets the last allowed char of ITokenValidationRule.
Declaration
public static char GetLastAllowedCharForTokenRule(char character, TokenTypes type)
Parameters
character
Char of the Token.
type
Type of the ITokenValidationRule.
Returns
Returns the last allowed char of ITokenValidationRule. If no rule is found, token char is returned.
GetTokenRule(char, TokenTypes)
Gets a ITokenValidationRule by its char and type.
Declaration
public static ITokenValidationRule GetTokenRule(char symbol, TokenTypes type)
Parameters
symbol
Token char.
type
Token type.
Returns