Skip to main content
A newer version of this page is available. .
All docs
V22.1

CustomTextMaskInputArgs Members

Exposes an API that allows you to create custom masks.

Fields

Name Description
Empty static Provides a value to use with events that do not have event data. Inherited from EventArgs.

Properties

Name Description
ActionType Returns the action a user has performed: entered one or multiple characters (Insert), erased characters (Backspace or Delete), clicked a spin button (SpinUp, SpinDown). ActionType.Init is returned when a form is initialized, a custom mask is applied, or an editor gains or loses focus.
CurrentCursorPosition Returns the zero-based cursor position. To obtain text blocks before and after this position, use the CurrentHead and CurrentTail properties.
CurrentEditText Returns the current editor text. This property is different from ResultEditText, which returns the editor text if user edits are accepted.
CurrentHead Returns the current editor text that precedes the cursor position or selected text.
CurrentSelectedText Returns the currently selected editor text. To obtain the zero-based position of the first and last characters of a selection, use the CurrentSelectionStart and CurrentSelectionEnd properties.
CurrentSelectionAnchor Returns a value of either the CurrentSelectionStart (if a user selected a portion of editor text from left to right) or CurrentSelectionEnd (from right to left) property.
CurrentSelectionEnd Returns the zero-based index of the right-most character of the current selection.
CurrentSelectionStart Returns the zero-based index of the left-most character of the current selection.
CurrentTail Returns the current editor text that follows the cursor position or selected text.
InsertedText Returns the text string a user attempts to add to this editor. If a user tries to erase text, this property returns String.Empty.
IsCanceled Returns whether an editor dicards a user action. Editors discard user actions that lead to no changes (for example, a user selects a character and types the same character, or presses Backspace when no characters behind a caret are present).
IsSelection Returns whether a portion of the current editor text is selected (the CurrentSelectedText property is not String.Empty).
ResultCursorPosition Returns the final position of a caret (cursor) if a user edit is accepted. The current caret position (before a user edit) is stored in the CurrentCursorPosition property.
ResultEditText Returns the final editor text if user edits are accepted. The current editor text (before a user edit) is stored in the CurrentEditText property.
ResultSelectionAnchor Returns the selection anchor if user edits are accepted.
Tag

Methods

Name Description
Cancel() Cancels an edit a user attempts to perform.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
SetResult(String, Int32, Nullable<Int32>) Sets the final editor text, selection anchor, and cursor position.
SetResult(String, String) Sets the final editor text and cursor position.
ToString() Returns the transcript of a user edit in the following format: ‘(InitialState)->UserAction->(FinalState)’.
See Also