RadMaskedTextInput
Represents the RadMaskedTextInput control.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Input.dll
Syntax:
[TelerikToolboxCategory("Input")]
[Themable]
public class RadMaskedTextInput : RadMaskedSectionBase
Inheritance: objectRadMaskedInputBaseRadMaskedSectionBaseRadMaskedTextInput
Derived Classes:
Inherited Members
Constructors
Initializes a new instance of the RadMaskedTextInput class.
public RadMaskedTextInput()
Fields
ValidationRegexProperty
DependencyProperty
Identifies the ValidationRegex dependency property.
public static readonly DependencyProperty ValidationRegexProperty
ValueModeProperty
DependencyProperty
Identifies the ValueMode dependency property.
public static readonly DependencyProperty ValueModeProperty
ValueProperty
DependencyProperty
Identifies the Value dependency property.
public static readonly DependencyProperty ValueProperty
Properties
Gets the resolved masked text.
protected override string MaskedTextResolved { get; }
Overrides:
Gets or sets the string used for the additional Regex validation.
public string ValidationRegex { get; set; }
Methods
The text has changed and the DisplayText has to be coerced against the Text.
protected override string CoerceDisplayTextOverride()
Returns the display text.
Overrides:
Coerces the ValueInternal property from the Value property.
protected override void CoerceInternalValueFromStronglyTypeValueOverride()
Overrides:
Coerces the Value property from the ValueInternal property.
protected override void CoerceStronglyTypeValueFromInternalValueOverride()
Overrides:
The text has changed and the value has to be coerced against the text.
protected override bool CoerceValueOverride()
Returns true if the value can be coerced.
Overrides:
Retrieves the next char.
protected virtual char GetNextChar(ITokenValidationRule rule, char spinValue, bool? forwardSpin)
Currently used rule.
spinValuecharThe char which is currently spin.
forwardSpinbool?Direction of spin.
Returns:When overridden gets the sections' position from the MaskedText.
public virtual Dictionary<int, string> GetSectionsFromMaskedTextOverride()
Returns a dictionary with the sections.
The key of the items is the position of the section, the value is the string representation of the section.
Gets the valid char for a position.
protected override string GetValidCharOverride(char character, ref int position, bool? forwardSpin, out bool isValid)
The character to be validated.
positionintPosition in the MaskedText to validate.
forwardSpinbool?True if a forward spin is applied, false for backward spin, null for no spin.
isValidboolTrue if the character is valid for this position.
Returns:Returns the result valid character for the specified position.
Overrides:
Handles the Back key when no mask.
protected override void HandleBackKeyNoMask()
Overrides:
Handles the Enter key.
protected override bool HandleEnterKey()
Returns a value indicating whether event should be handled or not.
Overrides:
Handles the Space key.
protected override bool HandleSpaceKey()
Returns a value indicating whether event should be handled or not.
Overrides:
Handles the Subtract key.
protected override bool HandleSubstractKey()
Returns a value indicating whether event should be handled or not.
Overrides:
Inserts a new character when no mask.
Performs validation on the masked text.
protected override MaskValidationResult IsMaskValidOverride()
Returns validation result information.
Overrides:
Called when the template applied to the element is applied. This method provides an opportunity to perform additional template-specific setup.
public override void OnApplyTemplate()
Overrides:
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Called when control is loaded.
protected override void OnLoadedOverride(object sender, RoutedEventArgs e)
The sender.
eRoutedEventArgsThe RoutedEventArgs instance containing the event data.
Overrides:
Determines the new SelectionStart position.
protected override int OnSelectionOnFocus(SelectionOnFocus selectionOnFocus)
Overrides:
Parses the Mask property and sets the MaskedText.
Inserts the input char or overwrites the current char with the input one.
Refreshes the positions of the sections.
protected override void RefreshSectionPositions()
Overrides:
Performs a pre-value changing checking whether the inherited control allows the ValueChanging(ed) events to be raised.
protected override bool ValueChangingOverride(RoutedEventArgs args)
Returns a boolean flag whether the value change has to be handled or not.
Overrides:
If false is returns, the value change proceeds. If true is returned, the update is terminated.