FixedMaskedTextProvider.IHandler

public interface FixedMaskedTextProvider.IHandler : IMaskedTextProvider
Handler interface for implementations of the FixedMaskedTextProvider.

Properties

AllowPromptAsInput

#
bool AllowPromptAsInput { get; }
Gets a value indicating whether the PromptChar can be a valid input character by the user.

AsciiOnly

#
bool AsciiOnly { get; }
Gets a value indicating whether the input only accepts ascii characters A-Z or a-z.

AutoAdvance

#
bool AutoAdvance { get; set; }
Gets or sets a value indicating that the cursor position will advance past literals to the next available edit position automatically.

Culture

#
CultureInfo Culture { get; }
Gets the culture for the mask, as specified in the constructor.

EditPositions

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

IncludeLiterals

#
bool IncludeLiterals { get; set; }
Gets or sets a value indicating that the FixedMaskedTextProvider.Text property includes literals in the mask.

IncludePrompt

#
bool IncludePrompt { get; set; }
Gets or sets a value indicating that the FixedMaskedTextProvider.Text property includes prompt characters for each edit position in the mask.

IsEmpty

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

IsPassword

#
bool IsPassword { get; set; }
Gets or sets a value indicating whether the mask should be password protected.

MaskCompleted

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

MaskFull

#
bool MaskFull { get; }
Gets a value indicating that all available edit positions in the mask have been filled out.

PasswordChar

#
char PasswordChar { get; set; }
In password mode, gets or sets the character to show for filled edit characters in the mask.

PromptChar

#
char PromptChar { get; set; }
Gets or sets the character to show for each unfilled edit position in the mask.

SkipLiterals

#
bool SkipLiterals { get; set; }
Gets or sets a value indicating that the user can type literals to skip them in the mask.

Text

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

Methods

Clear

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 fromIMaskedTextProvider
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 IMaskedTextProvider.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.

CommitText

void CommitText()
Called to update the display text after changes to the mask value.
inherited fromIMaskedTextProvider
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.

Create

#
void Create(string mask, CultureInfo culture, bool allowPromptAsInput, bool restrictToAscii)
Called when a new instance of the FixedMaskedTextProvider is created
mask (string)Mask for the input. See Mask for mask format.
culture (CultureInfo)Culture to format date/time separators and numeric placeholders.
allowPromptAsInput (bool)If set to true, then allow the PromptChar as valid input.
restrictToAscii (bool)If set to true, restrict input characters to ASCII only (a-z or A-Z).

Delete

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 fromIMaskedTextProvider
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.

Insert

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

Replace

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