Masked text provider for numeric input of the specified type.
T

Constructors

Properties

AllowDecimal

public bool AllowDecimal { get; set; }
Gets or sets a value indicating that the mask can optionally include a decimal, as specified by the NumericMaskedTextProvider.DecimalCharacter.
inherited fromNumericMaskedTextProvider

AllowSign

public bool AllowSign { get; set; }
Gets or sets a value indicating that the mask can optionally include the sign, as specified by NumericMaskedTextProvider.SignCharacters.
inherited fromNumericMaskedTextProvider

AltDecimalCharacters

public char[] AltDecimalCharacters { get; set; }
Gets or sets the alternate decimal character that can be accepted.
inherited fromNumericMaskedTextProvider
Remarks: This is useful when the DecimalCharacter is localized but you still want to allow alternate characters

Builder

protected StringBuilder Builder { get; }
Gets the underlying string builder for the current mask text value.
inherited fromVariableMaskedTextProvider

DecimalCharacter

[DefaultValue('.')] public char DecimalCharacter { get; set; }
Gets or sets the decimal character when NumericMaskedTextProvider.AllowDecimal is true. Default is '.'.
inherited fromNumericMaskedTextProvider

DecimalPlaces

#Since v2.12
public int DecimalPlaces { get; set; }
Gets or sets the minimum number of decimal places to include in the output.

DisplayText

public virtual string DisplayText { get; }
Gets the display text, including prompt characters.
inherited fromVariableMaskedTextProvider

EditPositions

public virtual IEnumerable<int> EditPositions { get; }
Gets an enumeration of all valid edit positions in the mask.
inherited fromVariableMaskedTextProvider

FormatString

#Since v2.12
public string FormatString { get; set; }
Gets or sets the format string to use for formatting the value. If specified, this will override the DecimalPlaces and MaximumDecimalPlaces properties.

IsEmpty

public virtual bool IsEmpty { get; }
Gets a value indicating the mask is empty with no characters filled out.
inherited fromVariableMaskedTextProvider

MaskCompleted

public override bool MaskCompleted { get; }
Gets a value indicating whether the mask has all required text to pass its validation.
inherited fromNumericMaskedTextProvider

MaximumDecimalPlaces

#Since v2.12
public int MaximumDecimalPlaces { get; set; }
Gets or sets the maximum number of decimal places to include in the output.

SignCharacters

public char[] SignCharacters { get; set; }
Gets or sets the sign characters when NumericMaskedTextProvider.AllowSign is true. Default is '+' and '-'.
inherited fromNumericMaskedTextProvider

Text

public virtual string Text { get; set; }
Gets or sets the text, usually excluding prompt or literal characters depending on the mask provider.
inherited fromVariableMaskedTextProvider

Value

#
public T Value { get; set; }
Gets or sets the translated value of the mask.

Methods

Clear

public virtual bool Clear(ref int position, int length, bool forward)
Called to clear a range of characters at the specified position in the masked text.
inherited fromVariableMaskedTextProvider
Remarks: The cleared characters usually show the prompt character after cleared. This is useful for fixed length mask providers. For variable length, this is usually the same as calling VariableMaskedTextProvider.Delete(int, int, bool).
position (ref int)Position to clear at.
length (int)Length of text (in the mask) to clear
forward (bool)true to delete the text forward, or false to delete backward
true when the deletion was successful, or false if it failed.
Clear

CommitText

#Since v2.12
public override void CommitText()
Called to update the display text after changes to the mask value.
Remarks: This is called after user changes to the mask value is complete, such as when the control loses focus, or when the user presses enter. This allows the mask provider to update the display text after changes are made to the value, while still allowing the user to type in the text without it changing until they are done.
CommitText

Delete

public virtual bool Delete(ref int position, int length, bool forward)
Called to delete a range of characters at the specified position in the masked text.
inherited fromVariableMaskedTextProvider
position (ref int)Position to delete at.
length (int)Length of text (in the mask) to delete
forward (bool)true to delete the text forward, or false to delete backward
true when the deletion was successful, or false if it failed.
Delete

Insert

public override bool Insert(char character, ref int position)
Called to insert a character at the specified position in the masked text.
inherited fromNumericMaskedTextProvider
character (char)Character to insert.
position (ref int)Position to insert at.
true when the insertion was successful, or false if it failed.

Replace

public override bool Replace(char character, ref int position)
Called to replace a character at the specified position in the masked text.
inherited fromNumericMaskedTextProvider
character (char)Character to insert.
position (ref int)Position to insert at.
true when the replacement was successful, or false if it failed.