Class RadMaskedTextInput
Represents the RadMaskedTextInput control.
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input.dll
Syntax
[TelerikToolboxCategory("Input")]
[Themable]
public class RadMaskedTextInput : RadMaskedSectionBase, IThemable
Constructors
RadMaskedTextInput()
Fields
ValidationRegexProperty
Identifies the ValidationRegex dependency property.
Declaration
public static readonly DependencyProperty ValidationRegexProperty
Field Value
System.Windows.DependencyProperty
|
ValueModeProperty
Identifies the ValueMode dependency property.
Declaration
public static readonly DependencyProperty ValueModeProperty
Field Value
System.Windows.DependencyProperty
|
ValueProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
System.Windows.DependencyProperty
|
Properties
MaskedTextResolved
Gets the resolved masked text.
Declaration
protected override string MaskedTextResolved { get; }
Property Value
System.String
|
Overrides
ValidationRegex
Gets or sets the string used for the additional Regex validation.
Declaration
public string ValidationRegex { get; set; }
Property Value
System.String
|
Value
Gets or sets the Value property.
Declaration
public string Value { get; set; }
Property Value
System.String
|
ValueMode
Gets or sets the ValueMode property. It determines the way Value property is formatted - with or without mask literals, placeholders.
Declaration
public ValueMode ValueMode { get; set; }
Property Value
ValueMode
|
Methods
CoerceDisplayTextOverride()
The text has changed and the DisplayText has to be coerced against the Text.
Declaration
protected override string CoerceDisplayTextOverride()
Returns
System.String
Returns the display text. |
Overrides
CoerceImeInputString(String)
Initial process of the text receives from the IME input.
Declaration
protected override string CoerceImeInputString(string text)
Parameters
System.String
text
The initial text received from the IME. |
Returns
System.String
|
Overrides
CoerceInternalValueFromStronglyTypeValueOverride()
Coerces the ValueInternal property from the Value property.
Declaration
protected override void CoerceInternalValueFromStronglyTypeValueOverride()
Overrides
CoerceStronglyTypeValueFromInternalValueOverride()
Coerces the Value property from the ValueInternal property.
Declaration
protected override void CoerceStronglyTypeValueFromInternalValueOverride()
Overrides
CoerceTextInternalOverride(ref Int32)
The internal value has changed and the Text has to be coerced against the ValueInternal.
Declaration
protected override string CoerceTextInternalOverride(ref int selectionStart)
Parameters
System.Int32
selectionStart
The selection start. |
Returns
System.String
Returns the string coerced from ValueInternal. |
Overrides
CoerceTextOverride(ref Int32)
The value has changed and the Text has to be coerced against the value.
Declaration
protected override string CoerceTextOverride(ref int selectionStart)
Parameters
System.Int32
selectionStart
The selection start. |
Returns
System.String
Returns the string to be coerced. |
Overrides
CoerceValueOverride()
The text has changed and the value has to be coerced against the text.
Declaration
protected override bool CoerceValueOverride()
Returns
System.Boolean
Returns true if the value can be coerced. |
Overrides
FindNextAvailablePosition(Boolean, Int32)
Finds the next editable position after delete or backspace press. Skips literals if needed.
Declaration
protected override int FindNextAvailablePosition(bool forward, int position)
Parameters
System.Boolean
forward
|
System.Int32
position
|
Returns
System.Int32
|
Overrides
GetFormattedValue(String)
Formats the TextInternal property based on the ValueMode value and passes the result to the Value.
Declaration
protected virtual string GetFormattedValue(string textInternal)
Parameters
System.String
textInternal
|
Returns
System.String
|
GetNextChar(ITokenValidationRule, Char, Nullable<Boolean>)
Retrieves the next char.
Declaration
protected virtual char GetNextChar(ITokenValidationRule rule, char spinValue, bool? forwardSpin)
Parameters
ITokenValidationRule
rule
Currently used rule. |
System.Char
spinValue
The char which is currently spin. |
System.Nullable<System.Boolean>
forwardSpin
Direction of spin. |
Returns
System.Char
|
GetSectionsFromMaskedTextOverride()
When overridden gets the sections' position from the MaskedText.
Declaration
public virtual Dictionary<int, string> GetSectionsFromMaskedTextOverride()
Returns
System.Collections.Generic.Dictionary<System.Int32, System.String>
Returns a dictionary with the sections. |
Remarks
The key of the items is the position of the section, the value is the string representation of the section.
GetValidCharOverride(Char, ref Int32, Nullable<Boolean>, out Boolean)
Gets the valid char for a position.
Declaration
protected override string GetValidCharOverride(char character, ref int position, bool? forwardSpin, out bool isValid)
Parameters
System.Char
character
The character to be validated. |
System.Int32
position
Position in the MaskedText to validate. |
System.Nullable<System.Boolean>
forwardSpin
True if a forward spin is applied, false for backward spin, null for no spin. |
System.Boolean
isValid
True if the character is valid for this position. |
Returns
System.String
Returns the result valid character for the specified position. |
Overrides
HandleBackKeyNoMask()
Handles the Back key when no mask.
Declaration
protected override void HandleBackKeyNoMask()
Overrides
HandleEnterKey()
Handles the Enter key.
Declaration
protected override bool HandleEnterKey()
Returns
System.Boolean
Returns a value indicating whether event should be handled or not. |
Overrides
HandlePasteNoMask(Object, out Object)
Handles paste operation in no-mask scenarios.
Declaration
protected override bool HandlePasteNoMask(object value, out object returnString)
Parameters
System.Object
value
|
System.Object
returnString
|
Returns
System.Boolean
|
Overrides
HandlePasteOverride(Object, out Object)
Handles the paste operation.
Declaration
protected override bool HandlePasteOverride(object value, out object returnString)
Parameters
System.Object
value
The value to be pasted. |
System.Object
returnString
Returns the string representation of the value. |
Returns
System.Boolean
Returns true if the value can be pasted. |
Overrides
HandleSpaceKey()
Handles the Space key.
Declaration
protected override bool HandleSpaceKey()
Returns
System.Boolean
Returns a value indicating whether event should be handled or not. |
Overrides
HandleSpin(Int32, Nullable<Boolean>)
Handle the spin of the value.
Declaration
protected override void HandleSpin(int position, bool? forwardSpin)
Parameters
System.Int32
position
Position of spin. |
System.Nullable<System.Boolean>
forwardSpin
Direction of spin. |
Overrides
HandleSubstractKey()
Handles the Subtract key.
Declaration
protected override bool HandleSubstractKey()
Returns
System.Boolean
Returns a value indicating whether event should be handled or not. |
Overrides
InsertCharNoMask(Char)
Inserts a new character when no mask.
Declaration
protected override void InsertCharNoMask(char character)
Parameters
System.Char
character
|
Overrides
IsMaskValidOverride()
Performs validation on the masked text.
Declaration
protected override MaskValidationResult IsMaskValidOverride()
Returns
MaskValidationResult
Returns validation result information. |
Overrides
IsSeparatorNoMask(Char)
Gets a value indicating whether a char is a separator when no mask.
Declaration
protected override bool IsSeparatorNoMask(char character)
Parameters
System.Char
character
|
Returns
System.Boolean
|
Overrides
MoveCharactersInInsertBehavior(ref Int32, Char, Boolean)
Move characters to left and adjusts the caret position when BackSpace/Delete is pressed.
Declaration
protected override void MoveCharactersInInsertBehavior(ref int position, char inputSymbol, bool forward)
Parameters
System.Int32
position
|
System.Char
inputSymbol
|
System.Boolean
forward
|
Overrides
OnApplyTemplate()
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
OnLoadedOverride(Object, RoutedEventArgs)
Called when control is loaded.
Declaration
protected override void OnLoadedOverride(object sender, RoutedEventArgs e)
Parameters
System.Object
sender
The sender. |
System.Windows.RoutedEventArgs
e
The System.Windows.RoutedEventArgs instance containing the event data. |
Overrides
OnSelectionOnFocus(SelectionOnFocus)
Determines the new SelectionStart position.
Declaration
protected override int OnSelectionOnFocus(SelectionOnFocus selectionOnFocus)
Parameters
SelectionOnFocus
selectionOnFocus
|
Returns
System.Int32
|
Overrides
ParseMask()
Parses the Mask property and sets the MaskedText.
Declaration
protected override string ParseMask()
Returns
System.String
Returns the parsed Mask. |
Overrides
ProcessChar(Char)
Inserts the input char or overwrites the current char with the input one.
Declaration
protected override void ProcessChar(char inputSymbol)
Parameters
System.Char
inputSymbol
|
Overrides
RefreshSectionPositions()
Refreshes the positions of the sections.
Declaration
protected override void RefreshSectionPositions()
Overrides
UpdateEditableTextEndPositionsOverride(ref Int32, ref Int32)
Updates the EditableTextEnd and EditableTextStart properties.
Declaration
protected override void UpdateEditableTextEndPositionsOverride(ref int start, ref int end)
Parameters
System.Int32
start
|
System.Int32
end
|
Overrides
ValueChangingOverride(RoutedEventArgs)
Performs a pre-value changing checking whether the inherited control allows the ValueChanging(ed) events to be raised.
Declaration
protected override bool ValueChangingOverride(RoutedEventArgs args)
Parameters
System.Windows.RoutedEventArgs
args
|
Returns
System.Boolean
Returns a boolean flag whether the value change has to be handled or not. |
Overrides
Remarks
If false is returns, the value change proceeds. If true is returned, the update is terminated.