Class
TokenLocator

Class that manages the Mask Tokens.

Definition

Namespace:Telerik.Windows.Controls.MaskedInput.Tokens

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
public static class TokenLocator

Inheritance: objectTokenLocator

Methods

AddCustomValidationRule(ITokenValidationRule)

Adds a custom validation rule to the TokenLocator.

Declaration

cs-api-definition
public static void AddCustomValidationRule(ITokenValidationRule rule)

Parameters

rule

ITokenValidationRule

Rule to be added.

Exceptions

Exception

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

cs-api-definition
public static char GetFirstAllowedCharForTokenRule(char character, TokenTypes type)

Parameters

character

char

Char of the Token.

type

TokenTypes

Type of the Rule.

Returns

char

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

cs-api-definition
public static char GetLastAllowedCharForTokenRule(char character, TokenTypes type)

Parameters

character

char

Char of the Token.

type

TokenTypes

Type of the ITokenValidationRule.

Returns

char

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

cs-api-definition
public static ITokenValidationRule GetTokenRule(char symbol, TokenTypes type)

Parameters

symbol

char

Token char.

type

TokenTypes

Token type.

Returns

ITokenValidationRule