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

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class NumericCharacterTextBoxProvider : IMaskCharacterProvider

Inheritance: objectNumericCharacterTextBoxProvider

Implements: IMaskCharacterProvider

Constructors

Initializes a new instance of the NumericCharacterTextBoxProvider class using the specified mask and culture.

C#
public NumericCharacterTextBoxProvider(string mask, CultureInfo culture, NumericCharacterTextBoxProvider.RadNumericMaskFormatType numericType, RadMaskedEditBoxElement owner)
Parameters:maskstring

A string that represents the input mask.

cultureCultureInfo

A CultureInfo that is used to set region-sensitive separator characters.

numericTypeNumericCharacterTextBoxProvider.RadNumericMaskFormatType

The NumericCharacterTextBoxProvider.RadNumericMaskFormatType that represents the numeric mask format type.

ownerRadMaskedEditBoxElement

The RadMaskedEditBoxElement

Properties

Gets the culture that determines the value of the localizable separators and placeholders in the input mask.

C#
public CultureInfo Culture { get; }
Property Value:

A CultureInfo containing the culture information associated with the input mask.

Gets the input mask.

C#
public string Mask { get; }
Property Value:

A string containing the full mask.

Gets the percentage floating point value.

C#
public double PercentageFloatValue { get; }

Gets or sets the character used to represent the absence of user input.

C#
public char PromptChar { get; set; }
Property Value:

The character used to prompt the user for input. The default is zero (0).

Implements: IMaskCharacterProvider.PromptChar

Methods

Determines whether additional characters can be appended to the existing text.

C#
protected virtual bool AllowAppendCharacters()
Returns:

bool

A value indicating whether additional characters can be appended.

Raises a delete operation over the selected text. If there is no selection, deletes the first symbol after the cursor. If there is no selection and the cursor is after the last character, does not remove anything.

C#
public bool Delete()
Returns:

bool

true

Implements: IMaskCharacterProvider.Delete()

Ensures that minus sing is applied in front on the input string.

C#
protected virtual string EnsureMinusSign(string input, string parsedInput)
Parameters:inputstring

The input string.

parsedInputstring

The parsed input string.

Returns:

string

A parsed string with minus sign ensured.

Occurs when a key is pressed.

C#
public void KeyDown(object sender, KeyEventArgs e)
Parameters:senderobject

The sender.

eKeyEventArgs

Key event arguments.

Implements: IMaskCharacterProvider.KeyDown(object, KeyEventArgs)

Occurs when a key is pressed.

C#
public void KeyPress(object sender, KeyPressEventArgs e)
Parameters:senderobject

The sender.

eKeyPressEventArgs

Key event arguments.

Implements: IMaskCharacterProvider.KeyPress(object, KeyPressEventArgs)

Parses given string.

C#
protected virtual string ParseText(string value)
Parameters:valuestring

The string value.

Returns:

string

If successful returns the formatted value, otherwise returns the input value.

Parses the given value and formats it according to the NumericCharacterTextBoxProvider.RadNumericMaskFormatType and the Mask.

C#
protected virtual string ParseTextCore(string value, out int testPosition, out MaskedTextResultHint resultHint)
Parameters:valuestring

The string value.

testPositionint

Not used.

resultHintMaskedTextResultHint

Indicates whether the parse was successful.

Returns:

string

Removes characters between the two positions given as parameters.

C#
public bool RemoveAt(int startPosition, int endPosition)
Parameters:startPositionint

The start position.

endPositionint

The end position.

Returns:

bool

true, if the operation is successful, false if no characters are removed.

Implements: IMaskCharacterProvider.RemoveAt(int, int)

Sets the specified string within the formatted string, returning the status of the operation.

C#
public bool Set(string input, out int testPosition, out MaskedTextResultHint resultHint)
Parameters:inputstring

The string value that replaces the existing value.

testPositionint

Not used.

resultHintMaskedTextResultHint

A System.ComponentModel.MaskedTextResultHint that succinctly describes the result of the replacement operation. An output parameter.

Returns:

bool

true if the operation is successful, false if not.

Implements: IMaskCharacterProvider.Set(string, out int, out MaskedTextResultHint)

Returns the formatted string.

C#
public virtual string ToString(bool includePrompt, bool includeLiterals)
Parameters:includePromptbool

Not used.

includeLiteralsbool

Not used.

Returns:

string

The formatted System.String that includes all the assigned character values.

Implements: IMaskCharacterProvider.ToString(bool, bool)

Validates the given string value and applies it as if the value is valid.

C#
public bool Validate(string value)
Parameters:valuestring

THe string value that is about to be set.

Returns:

bool

A value indicating whether the string value is valid.