Class
NumericCharacterTextBoxProvider

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public class NumericCharacterTextBoxProvider : IMaskCharacterProvider

Inheritance: objectNumericCharacterTextBoxProvider

Implements: IMaskCharacterProvider

Constructors

NumericCharacterTextBoxProvider(string, CultureInfo, RadNumericMaskFormatType, RadMaskedEditBoxElement)

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

Declaration

cs-api-definition
public NumericCharacterTextBoxProvider(string mask, CultureInfo culture, NumericCharacterTextBoxProvider.RadNumericMaskFormatType numericType, RadMaskedEditBoxElement owner)

Parameters

mask

string

A string that represents the input mask.

culture

CultureInfo

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

numericType

NumericCharacterTextBoxProvider.RadNumericMaskFormatType

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

owner

RadMaskedEditBoxElement

The RadMaskedEditBoxElement

Properties

Culture

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

Declaration

cs-api-definition
public CultureInfo Culture { get; }

Property Value

CultureInfo

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

Mask

Gets the input mask.

Declaration

cs-api-definition
public string Mask { get; }

Property Value

string

A string containing the full mask.

PercentageFloatValue

Gets the percentage floating point value.

Declaration

cs-api-definition
public double PercentageFloatValue { get; }

Property Value

double

PromptChar

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

Declaration

cs-api-definition
public char PromptChar { get; set; }

Property Value

char

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

Implements IMaskCharacterProvider.PromptChar

Methods

AllowAppendCharacters()

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

Declaration

cs-api-definition
protected virtual bool AllowAppendCharacters()

Returns

bool

A value indicating whether additional characters can be appended.

Delete()

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.

Declaration

cs-api-definition
public bool Delete()

Returns

bool

true

Implements IMaskCharacterProvider.Delete()

EnsureMinusSign(string, string)

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

Declaration

cs-api-definition
protected virtual string EnsureMinusSign(string input, string parsedInput)

Parameters

input

string

The input string.

parsedInput

string

The parsed input string.

Returns

string

A parsed string with minus sign ensured.

KeyDown(object, KeyEventArgs)

Occurs when a key is pressed.

Declaration

cs-api-definition
public void KeyDown(object sender, KeyEventArgs e)

Parameters

sender

object

The sender.

e

KeyEventArgs

Key event arguments.

Implements IMaskCharacterProvider.KeyDown(object, KeyEventArgs)

KeyPress(object, KeyPressEventArgs)

Occurs when a key is pressed.

Declaration

cs-api-definition
public void KeyPress(object sender, KeyPressEventArgs e)

Parameters

sender

object

The sender.

e

KeyPressEventArgs

Key event arguments.

Implements IMaskCharacterProvider.KeyPress(object, KeyPressEventArgs)

ParseText(string)

Parses given string.

Declaration

cs-api-definition
protected virtual string ParseText(string value)

Parameters

value

string

The string value.

Returns

string

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

ParseTextCore(string, out int, out MaskedTextResultHint)

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

Declaration

cs-api-definition
protected virtual string ParseTextCore(string value, out int testPosition, out MaskedTextResultHint resultHint)

Parameters

value

string

The string value.

testPosition

int

Not used.

resultHint

MaskedTextResultHint

Indicates whether the parse was successful.

Returns

string

RemoveAt(int, int)

Removes characters between the two positions given as parameters.

Declaration

cs-api-definition
public bool RemoveAt(int startPosition, int endPosition)

Parameters

startPosition

int

The start position.

endPosition

int

The end position.

Returns

bool

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

Implements IMaskCharacterProvider.RemoveAt(int, int)

Set(string, out int, out MaskedTextResultHint)

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

Declaration

cs-api-definition
public bool Set(string input, out int testPosition, out MaskedTextResultHint resultHint)

Parameters

input

string

The string value that replaces the existing value.

testPosition

int

Not used.

resultHint

MaskedTextResultHint

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)

ToString(bool, bool)

Returns the formatted string.

Declaration

cs-api-definition
public virtual string ToString(bool includePrompt, bool includeLiterals)

Parameters

includePrompt

bool

Not used.

includeLiterals

bool

Not used.

Returns

string

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

Implements IMaskCharacterProvider.ToString(bool, bool)

Validate(string)

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

Declaration

cs-api-definition
public bool Validate(string value)

Parameters

value

string

THe string value that is about to be set.

Returns

bool

A value indicating whether the string value is valid.