New to Telerik UI for WPFStart a free 30-day trial

Class that manages the Mask Tokens.

Definition

Namespace:Telerik.Windows.Controls.MaskedInput.Tokens

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

C#
public static class TokenLocator

Inheritance: objectTokenLocator

Methods

Adds a custom validation rule to the TokenLocator.

C#
public static void AddCustomValidationRule(ITokenValidationRule rule)
Parameters:ruleITokenValidationRule

Rule to be added.

Exceptions:

Exception

Thrown when the rule is null, rule's token is empty or already exists such token.

Gets the first allowed char of ITokenValidationRule.

C#
public static char GetFirstAllowedCharForTokenRule(char character, TokenTypes type)
Parameters:characterchar

Char of the Token.

typeTokenTypes

Type of the Rule.

Returns:

char

Returns the first allowed char of ITokenValidationRule. If no rule is found, token char is returned.

Gets the last allowed char of ITokenValidationRule.

C#
public static char GetLastAllowedCharForTokenRule(char character, TokenTypes type)
Parameters:characterchar

Char of the Token.

typeTokenTypes

Type of the ITokenValidationRule.

Returns:

char

Returns the last allowed char of ITokenValidationRule. If no rule is found, token char is returned.

Gets a ITokenValidationRule by its char and type.

C#
public static ITokenValidationRule GetTokenRule(char symbol, TokenTypes type)
Parameters:symbolchar

Token char.

typeTokenTypes

Token type.

Returns:

ITokenValidationRule