Class
RadMaskedInputBase

Represents the base class for RadMaskedInput controls.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
[Themable]
public abstract class RadMaskedInputBase : Control

Inheritance: objectRadMaskedInputBase

Derived Classes: RadMaskedCurrencyInputRadMaskedNumericInputRadMaskedSectionBase

Constructors

RadMaskedInputBase()

Initializes a new instance of the RadMaskedInputBase class.

Declaration

cs-api-definition
protected RadMaskedInputBase()

Fields

AcceptsReturnProperty

Identifies the AcceptsReturn dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AcceptsReturnProperty

Field Value

DependencyProperty

AddSignKey

Keyboard key code for the positive sign key on PC.

Declaration

cs-api-definition
protected const int AddSignKey = 107

Field Value

int

AllowInvalidValuesProperty

Identifies the AllowInvalidValues dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AllowInvalidValuesProperty

Field Value

DependencyProperty

ClearButtonStyleProperty

Identifies the ClearButtonStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ClearButtonStyleProperty

Field Value

DependencyProperty

ClearCommandProperty

Identifies the ClearCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ClearCommandProperty

Field Value

DependencyProperty

CopyCommandProperty

Identifies the CopyCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CopyCommandProperty

Field Value

DependencyProperty

CultureProperty

Identifies the Culture dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CultureProperty

Field Value

DependencyProperty

CutCommandProperty

Identifies the CutCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CutCommandProperty

Field Value

DependencyProperty

DecimalCommaKey

Keyboard key code for the comma symbol on PC.

Declaration

cs-api-definition
protected const int DecimalCommaKey = 188

Field Value

int

DecimalPointKey

Keyboard key code for the decimal point symbol on PC.

Declaration

cs-api-definition
protected const int DecimalPointKey = 190

Field Value

int

DisplayErrorMessageProperty

Identifies the DisplayErrorMessage dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DisplayErrorMessageProperty

Field Value

DependencyProperty

EmptyContentProperty

Identifies the EmptyContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EmptyContentProperty

Field Value

DependencyProperty

EmptyContentTemplateProperty

Identifies the EmptyContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EmptyContentTemplateProperty

Field Value

DependencyProperty

ErrorMessageProperty

Identifies the ErrorMessage dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ErrorMessageProperty

Field Value

DependencyProperty

ErrorMessageTemplateProperty

Identifies the ErrorMessageTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ErrorMessageTemplateProperty

Field Value

DependencyProperty

FormatStringProperty

Identifies the FormatString dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty FormatStringProperty

Field Value

DependencyProperty

InputBehaviorProperty

Identifies the InputBehavior dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty InputBehaviorProperty

Field Value

DependencyProperty

IsClearButtonVisibleProperty

Identifies the IsClearButtonVisible dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsClearButtonVisibleProperty

Field Value

DependencyProperty

IsLastPositionEditableProperty

Identifies the IsLastPositionEditable dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsLastPositionEditableProperty

Field Value

DependencyProperty

IsMaskValidProperty

Identifies the IsMaskValid dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsMaskValidProperty

Field Value

DependencyProperty

IsReadOnlyProperty

Identifies the IsReadOnly dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsReadOnlyProperty

Field Value

DependencyProperty

MaskProperty

Identifies the Mask dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MaskProperty

Field Value

DependencyProperty

NegativeSignKey

Keyboard key code for the negative sign key on PC.

Declaration

cs-api-definition
protected const int NegativeSignKey = 189

Field Value

int

OriginalValueProperty

Identifies the OriginalValue dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty OriginalValueProperty

Field Value

DependencyProperty

PasteCommandProperty

Identifies the PasteCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PasteCommandProperty

Field Value

DependencyProperty

PlaceholderProperty

Identifies the Placeholder dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PlaceholderProperty

Field Value

DependencyProperty

SectionsNavigationModeProperty

Identifies the SectionsNavigationMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SectionsNavigationModeProperty

Field Value

DependencyProperty

SelectionOnFocusProperty

Identifies the SelectionOnFocus dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectionOnFocusProperty

Field Value

DependencyProperty

SpinModeProperty

Identifies the SpinMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SpinModeProperty

Field Value

DependencyProperty

TextBoxStyleProperty

Identifies the TextBoxStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextBoxStyleProperty

Field Value

DependencyProperty

TextModeProperty

Identifies the TextMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextModeProperty

Field Value

DependencyProperty

TextProperty

Gets the Text of the control.

Declaration

cs-api-definition
public static readonly DependencyProperty TextProperty

Field Value

DependencyProperty

UpdateValueEventProperty

Identifies the UpdateValueEvent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UpdateValueEventProperty

Field Value

DependencyProperty

ValueChangedEvent

Identifies the ValueChanged routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent ValueChangedEvent

Field Value

RoutedEvent

ValueChangingEvent

Identifies the ValueChanging routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent ValueChangingEvent

Field Value

RoutedEvent

ValueToTextConverterProperty

Identifies the ValueToTextConverter dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ValueToTextConverterProperty

Field Value

DependencyProperty

Properties

AcceptsReturn

Gets or sets a value indicating whether newline is accepted when the mask supports multiline.

Declaration

cs-api-definition
public bool AcceptsReturn { get; set; }

Property Value

bool

Remarks

Default value is false.

AllowInvalidValues

Gets or sets whether invalid values should be accepted as valid and set to the Value property.

Declaration

cs-api-definition
public bool AllowInvalidValues { get; set; }

Property Value

bool

AllowedDateTimeTokens

Gets the allowed DateTime tokens from the TokenLocator.

Declaration

cs-api-definition
protected static string AllowedDateTimeTokens { get; }

Property Value

string

AllowedModifierTokens

Gets the allowed modifier tokens from the TokenLocator.

Declaration

cs-api-definition
protected static string AllowedModifierTokens { get; }

Property Value

string

AllowedNumericTokens

Gets the allowed Numeric tokens from the TokenLocator.

Declaration

cs-api-definition
protected static string AllowedNumericTokens { get; }

Property Value

string

Builder

Represents a StringBuilder for performing string operations.

Declaration

cs-api-definition
protected StringBuilder Builder { get; set; }

Property Value

StringBuilder

ClearButtonStyle

Gets or sets the ClearButton style.

Declaration

cs-api-definition
public Style ClearButtonStyle { get; set; }

Property Value

Style

ClearCommand

Gets or sets the Clear command.

Declaration

cs-api-definition
public DelegateCommand ClearCommand { get; set; }

Property Value

DelegateCommand

CopyCommand

Gets or sets the Copy command.

Declaration

cs-api-definition
public DelegateCommand CopyCommand { get; set; }

Property Value

DelegateCommand

Culture

Gets or sets the Culture.

Declaration

cs-api-definition
public CultureInfo Culture { get; set; }

Property Value

CultureInfo

Remarks

Default culture is "en-US".

CutCommand

Gets or sets the Cut command.

Declaration

cs-api-definition
public DelegateCommand CutCommand { get; set; }

Property Value

DelegateCommand

DisplayErrorMessage

Gets the DisplayErrorMessage.

Declaration

cs-api-definition
public string DisplayErrorMessage { get; }

Property Value

string

Remarks

A default error message will be shown unless the ErrorMessage property is not set.

EditableTextEnd

Gets the ending position in the MaskedText that can be edited.

Declaration

cs-api-definition
protected int EditableTextEnd { get; }

Property Value

int

EditableTextLength

Gets the length of the editable section in the MaskedText.

Declaration

cs-api-definition
protected int EditableTextLength { get; }

Property Value

int

EditableTextStart

Gets the starting position in the MaskedText that can be edited.

Declaration

cs-api-definition
protected int EditableTextStart { get; }

Property Value

int

EmptyContent

Gets or sets the Empty content.

Declaration

cs-api-definition
public object EmptyContent { get; set; }

Property Value

object

Remarks

Default is an empty string.

EmptyContentTemplate

Gets or sets the template of the EmptyContent.

Declaration

cs-api-definition
public DataTemplate EmptyContentTemplate { get; set; }

Property Value

DataTemplate

ErrorMessage

Gets or sets the Error message.

Declaration

cs-api-definition
public string ErrorMessage { get; set; }

Property Value

string

ErrorMessageTemplate

Gets or sets the template of the ErrorMessage.

Declaration

cs-api-definition
public DataTemplate ErrorMessageTemplate { get; set; }

Property Value

DataTemplate

EscapedPositions

Contains the escaped positions of the MaskedText.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
[SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists")]
protected List<int> EscapedPositions { get; set; }

Property Value

List<int>

FormatString

Gets or sets the formatting string used to format the Text value.

Declaration

cs-api-definition
public string FormatString { get; set; }

Property Value

string

InputBehavior

Gets or sets the InputBehavior.

Declaration

cs-api-definition
public InputBehavior InputBehavior { get; set; }

Property Value

InputBehavior

Remarks

Default for numeric input should be Insert and for text and date input Replace.

InputBehaviorResolved

Gets or sets the resolved InputBehavior.

Declaration

cs-api-definition
protected virtual InputBehavior InputBehaviorResolved { get; }

Property Value

InputBehavior

IsClearButtonVisible

Gets or sets whether the clear button is visible.

Declaration

cs-api-definition
public bool IsClearButtonVisible { get; set; }

Property Value

bool

IsLastPositionEditable

Gets or sets a value indicating whether this instance is last position editable.

Declaration

cs-api-definition
public bool IsLastPositionEditable { get; set; }

Property Value

bool

True if this instance is last position editable; otherwise, false.

IsMaskValid

Gets or sets whether the control's mask is valid.

Declaration

cs-api-definition
public bool IsMaskValid { get; }

Property Value

bool

IsReadOnly

Gets or sets whether the control is IsReadOnly.

Declaration

cs-api-definition
public bool IsReadOnly { get; set; }

Property Value

bool

IsRevertingValue

Gets or sets a value indicating whether the control is currently reverting its value.

Declaration

cs-api-definition
protected bool IsRevertingValue { get; set; }

Property Value

bool

IsUsingOneWayBinding

Gets or sets value indicating whether the control is one-way bound.

Declaration

cs-api-definition
protected bool IsUsingOneWayBinding { get; }

Property Value

bool

IsValueChangingFromInternal

Specifies whether the Value is being changed from the ValueInternal property.

Declaration

cs-api-definition
protected bool IsValueChangingFromInternal { get; set; }

Property Value

bool

IsValueInternalSync

Specifies whether the ValueInternal is being synched from the Value property.

Declaration

cs-api-definition
protected bool IsValueInternalSync { get; set; }

Property Value

bool

LiteralPositions

Contains the literal positions of the MaskedText.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists")]
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
protected List<int> LiteralPositions { get; set; }

Property Value

List<int>

Mask

Gets or sets the Mask.

Declaration

cs-api-definition
public string Mask { get; set; }

Property Value

string

MaskResolved

Gets or sets the resolved Mask.

Declaration

cs-api-definition
protected string MaskResolved { get; set; }

Property Value

string

MaskedTextResolved

The resolved masked text.

Declaration

cs-api-definition
protected virtual string MaskedTextResolved { get; }

Property Value

string

OriginalValue

Gets or sets the OriginalValue.

Declaration

cs-api-definition
public object OriginalValue { get; set; }

Property Value

object

PasteCommand

Gets or sets the Paste command.

Declaration

cs-api-definition
public DelegateCommand PasteCommand { get; set; }

Property Value

DelegateCommand

Placeholder

Gets or sets the Placeholder.

Declaration

cs-api-definition
[TypeConverter(typeof(CharConverter))]
public char Placeholder { get; set; }

Property Value

char

Remarks

Default placeholder is "_".

SectionsNavigationMode

Gets or sets the sections navigation mode.

Declaration

cs-api-definition
public SectionsNavigationMode SectionsNavigationMode { get; set; }

Property Value

SectionsNavigationMode

The sections navigation mode.

SelectionLength

Gets or sets the Selection length.

Declaration

cs-api-definition
public int SelectionLength { get; set; }

Property Value

int

SelectionOnFocus

Gets or sets the SelectionOnFocus.

Declaration

cs-api-definition
public SelectionOnFocus SelectionOnFocus { get; set; }

Property Value

SelectionOnFocus

Remarks

Controls the selection when focus is acquired. Default is Unchanged.

SelectionStart

Gets or sets the Selection start.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public int SelectionStart { get; set; }

Property Value

int

Separators

Contains the Separators of the Mask.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists")]
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
protected List<Separator> Separators { get; set; }

Property Value

List<Separator>

SpinMode

Gets or sets the SpinMode.

Declaration

cs-api-definition
public SpinMode SpinMode { get; set; }

Property Value

SpinMode

Text

Identifies the Text dependency property.

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

TextBoxStyle

Gets the style of the TextBox.

Declaration

cs-api-definition
public Style TextBoxStyle { get; set; }

Property Value

Style

TextMode

Gets or sets the TextMode.

Declaration

cs-api-definition
public TextMode TextMode { get; set; }

Property Value

TextMode

Remarks

Controls the of format of the Text property. Default is MaskedText.

UpdateValueEvent

Gets or sets the UpdateValueEvent.

Declaration

cs-api-definition
public UpdateValueEvent UpdateValueEvent { get; set; }

Property Value

UpdateValueEvent

Remarks

Controls when the Value is updated. Default is PropertyChanged.

UseBaseNavigation

Gets or sets a value whether the base class should apply base navigation.

Declaration

cs-api-definition
protected virtual bool UseBaseNavigation { get; }

Property Value

bool

ValueToTextConverter

Gets or sets the ValueToTextConverter.

Declaration

cs-api-definition
public IValueConverter ValueToTextConverter { get; set; }

Property Value

IValueConverter

Methods

CallSpin(bool)

Spins the control.

Declaration

cs-api-definition
public void CallSpin(bool isUp)

Parameters

isUp

bool

True for spinning up, false for down.

CanModifyChar(char)

Gets a value indicating whether the char can be modified when no mask.

Declaration

cs-api-definition
protected virtual bool CanModifyChar(char character)

Parameters

character

char

Returns

bool

CanReplaceChar(char)

Gets a value indicating whether the char can be replaced when no mask.

Declaration

cs-api-definition
protected virtual bool CanReplaceChar(char character)

Parameters

character

char

Returns

bool

CheckForDataValidationErrors(DependencyProperty, ref MaskValidationResult)

Checks the value of a DependencyProperty for validation errors.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "1#")]
protected void CheckForDataValidationErrors(DependencyProperty prop, ref MaskValidationResult result)

Parameters

prop

DependencyProperty

The DependencyProperty to be checked.

result

MaskValidationResult

Returns the validation information.

ClearSelectionNoMask()

Clears the selection when no mask.

Declaration

cs-api-definition
protected virtual void ClearSelectionNoMask()

CoerceDisplayTextOverride()

The text has changed and the DisplayText has to be coerced against the Text.

Declaration

cs-api-definition
protected abstract string CoerceDisplayTextOverride()

Returns

string

Returns the display text.

CoerceImeInputString(string)

Initial process of the text receives from the IME input.

Declaration

cs-api-definition
protected virtual string CoerceImeInputString(string text)

Parameters

text

string

The initial text received from the IME.

Returns

string

CoerceInternalValueFromStronglyTypeValueOverride()

Coerces the ValueInternal property from the Value property.

Declaration

cs-api-definition
protected abstract void CoerceInternalValueFromStronglyTypeValueOverride()

CoerceStronglyTypeValueFromInternalValueOverride()

Coerces the Value property from the ValueInternal property.

Declaration

cs-api-definition
protected abstract void CoerceStronglyTypeValueFromInternalValueOverride()

CoerceTextInternalOverride(ref int)

The internal value has changed and the Text has to be coerced against the ValueInternal.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "0#")]
protected abstract string CoerceTextInternalOverride(ref int selectionStart)

Parameters

selectionStart

int

The selection start.

Returns

string

Returns the coerced text.

CoerceTextOverride(ref int)

The value has changed and the Text has to be coerced against the value.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "0#")]
protected abstract string CoerceTextOverride(ref int selectionStart)

Parameters

selectionStart

int

The selection start.

Returns

string

Returns the string to be coerced.

CoerceValueOverride()

The text has changed and the value has to be coerced against the text.

Declaration

cs-api-definition
protected abstract bool CoerceValueOverride()

Returns

bool

Returns true if the value can be coerced.

CopyBinding(Binding)

Clones a Binding and sets its Mode to TwoWay and UpdateSourceTrigger to Explicit.

Declaration

cs-api-definition
protected static Binding CopyBinding(Binding bindingToCopy)

Parameters

bindingToCopy

Binding

The binding to copy.

Returns

Binding

Returns the copied binding.

Remarks

This is intended to be used in scenarios, where a one-way binding is used and value change notifications are still needed.

FindNextAvailablePosition(bool, int)

Finds the next available position in the MaskedTextResolved.

Declaration

cs-api-definition
protected virtual int FindNextAvailablePosition(bool forward, int position)

Parameters

forward

bool

True if the search is perform forwards, false for backwards.

position

int

The starting position of the search.

Returns

int

Returns the found position.

FindNextSeparatorPosition(bool, int, out Separator)

Finds the next position with separator.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#")]
protected virtual int FindNextSeparatorPosition(bool forward, int position, out Separator separator)

Parameters

forward

bool

The direction of the search. True for forward, false for backward.

position

int

The position from which the search starts.

separator

Separator

The found separator.

Returns

int

Returns the position of the separator.

Remarks

If no position is found, the method will return the EditableTextStart or EditableTextEnd depending on the direction.

FindNextSeparatorPosition(int)

Finds the next separator position when no mask.

Declaration

cs-api-definition
protected virtual int FindNextSeparatorPosition(int position)

Parameters

position

int

Returns

int

FindPreviousAvailablePositionNoMask()

Finds the previous available position when no mask.

Declaration

cs-api-definition
protected virtual int FindPreviousAvailablePositionNoMask()

Returns

int

FindPreviousSeparatorPosition(int)

Finds the previous separator position.

Declaration

cs-api-definition
protected virtual int FindPreviousSeparatorPosition(int position)

Parameters

position

int

Returns

int

GetRightOffset()

Gets the offset from the right.

Declaration

cs-api-definition
protected virtual int GetRightOffset()

Returns

int

GetValidCharOverride(char, ref int, bool?, out bool)

Gets the valid char for a position.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "1#")]
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "3#")]
protected abstract string GetValidCharOverride(char character, ref int position, bool? forwardSpin, out bool isValid)

Parameters

character

char

The character to be validated.

position

int

Position in the MaskedText to validate.

forwardSpin

bool?

True if a forward spin is applied, false for backward spin, null for no spin.

isValid

bool

True if the character is valid for this position.

Returns

string

Returns the result valid character for the specified position.

HandleBackKeyNoMask()

Handles the Back key when no mask.

Declaration

cs-api-definition
protected virtual void HandleBackKeyNoMask()

HandleBackKeyWithMask()

Process the input when Backspace has been pressed and the mask in not "".

Declaration

cs-api-definition
protected virtual void HandleBackKeyWithMask()

HandleBackKeyWithMaskSelected()

Process the input when Backspace has been pressed, the mask in not "" and there is a selection.

Declaration

cs-api-definition
protected virtual void HandleBackKeyWithMaskSelected()

HandleClearOverride()

Called, when the Clear command is invoked.

Declaration

cs-api-definition
protected virtual void HandleClearOverride()

HandleDeleteKeyNoMask()

Handles the Delete key when no mask.

Declaration

cs-api-definition
protected virtual void HandleDeleteKeyNoMask()

HandleDivideKey()

Handles the Divide key.

Declaration

cs-api-definition
protected virtual bool HandleDivideKey()

Returns

bool

Returns a value indicating whether event should be handled or not.

HandleEnterKey()

Handles the Enter key.

Declaration

cs-api-definition
protected virtual bool HandleEnterKey()

Returns

bool

Returns a value indicating whether event should be handled or not.

HandleLeftKey()

Handles the left key down.

Declaration

cs-api-definition
protected virtual void HandleLeftKey()

HandleMultiplyKey()

Handles the Multiply key.

Declaration

cs-api-definition
protected virtual bool HandleMultiplyKey()

Returns

bool

Returns a value indicating whether event should be handled or not.

HandlePaste()

Handles the paste operation.

Declaration

cs-api-definition
protected virtual void HandlePaste()

HandlePasteNoMask(object, out object)

Handles paste operation in no-mask scenarios.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")]
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#")]
protected virtual bool HandlePasteNoMask(object value, out object returnString)

Parameters

value

object

returnString

object

Returns

bool

HandlePasteOverride(object, out object)

Handles the paste operation.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")]
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#")]
protected virtual bool HandlePasteOverride(object value, out object returnString)

Parameters

value

object

The value to be pasted.

returnString

object

Returns the string representation of the value.

Returns

bool

Returns true if the value can be pasted.

HandleSpaceKey()

Handles the Space key.

Declaration

cs-api-definition
protected virtual bool HandleSpaceKey()

Returns

bool

Returns a value indicating whether event should be handled or not.

HandleSpin(int, bool?)

Handle the spin of the value.

Declaration

cs-api-definition
protected virtual void HandleSpin(int position, bool? forwardSpin)

Parameters

position

int

Position of spin.

forwardSpin

bool?

Direction of spin.

HandleSpinNoMask(bool)

Handles the spin when no mask.

Declaration

cs-api-definition
protected virtual void HandleSpinNoMask(bool isUp)

Parameters

isUp

bool

HandleSubstractKey()

Handles the Subtract key.

Declaration

cs-api-definition
protected virtual bool HandleSubstractKey()

Returns

bool

Returns a value indicating whether event should be handled or not.

HandleTabKeyNoMask()

Handles the tab key when no mask.

Declaration

cs-api-definition
protected virtual bool HandleTabKeyNoMask()

Returns

bool

HandleUnknownKeyOverride(int)

Handles the key press of an Unknown key with a specific key code.

Declaration

cs-api-definition
protected virtual bool HandleUnknownKeyOverride(int keyCode)

Parameters

keyCode

int

Key's key code.

Returns

bool

Returns true if the key should not be processed.

InsertCharNoMask(char)

Inserts a new character when no mask.

Declaration

cs-api-definition
protected virtual void InsertCharNoMask(char character)

Parameters

character

char

IsCharValid(char)

Gets a value indicating whether the char is valid when no mask.

Declaration

cs-api-definition
protected virtual bool IsCharValid(char character)

Parameters

character

char

Returns

bool

IsMaskValidOverride()

Performs validation on the masked text.

Declaration

cs-api-definition
protected virtual MaskValidationResult IsMaskValidOverride()

Returns

MaskValidationResult

Returns validation result information.

IsPlaceholder(char)

Checks whether a specific character is a placeholder.

Declaration

cs-api-definition
protected virtual bool IsPlaceholder(char character)

Parameters

character

char

The character to be checked.

Returns

bool

Returns true if the character is a placeholder.

IsPlaceholder(int)

Checks whether a specific index is a placeholder.

Declaration

cs-api-definition
protected virtual bool IsPlaceholder(int index)

Parameters

index

int

The index to be checked.

Returns

bool

Returns true if the string is a placeholder.

IsPlaceholder(string)

Checks whether a specific string is a placeholder.

Declaration

cs-api-definition
protected virtual bool IsPlaceholder(string value)

Parameters

value

string

The string to be checked.

Returns

bool

Returns true if the string is a placeholder.

IsSeparator(char)

Checks whether a specific character is a separator.

Declaration

cs-api-definition
protected virtual bool IsSeparator(char character)

Parameters

character

char

The character to be checked.

Returns

bool

Returns true if the character is a separator.

IsSeparator(char, out Separator)

Checks whether a specific character is a separator.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#")]
protected virtual bool IsSeparator(char character, out Separator separator)

Parameters

character

char

The character to be checked.

separator

Separator

Returns the separator that the character represents.

Returns

bool

Returns true if the character is a separator.

IsSeparator(string)

Checks whether a specified string is a separator.

Declaration

cs-api-definition
protected virtual bool IsSeparator(string value)

Parameters

value

string

The string to be checked.

Returns

bool

Returns true if the string is a separator.

IsSeparator(string, out Separator)

Checks whether a specified string is a separator.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#")]
protected virtual bool IsSeparator(string value, out Separator separator)

Parameters

value

string

The string to be checked.

separator

Separator

Returns the separator that the string represents.

Returns

bool

Returns true if the character is a separator.

IsSeparatorNoMask(char)

Gets a value indicating whether a char is a separator when no mask.

Declaration

cs-api-definition
protected virtual bool IsSeparatorNoMask(char character)

Parameters

character

char

Returns

bool

MoveCharactersInInsertBehavior(ref int, char, bool)

Moves characters to the left in Currency and Numeric Input.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "1#")]
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "0#")]
protected virtual void MoveCharactersInInsertBehavior(ref int position, char inputSymbol, bool forward)

Parameters

position

int

inputSymbol

char

forward

bool

MoveCharactersInInsertBehaviorOverride(ref int, char, bool)

Moves a group characters from the specified position to the left (forward) or right (backward) one position from the last Placeholder.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "0#")]
protected virtual void MoveCharactersInInsertBehaviorOverride(ref int position, char character, bool forward)

Parameters

position

int

The position from which the move has to be done.

character

char

The character input at this position.

forward

bool

The direction of the moving.

Remarks

The method expects the text after the move to the set to the internal TextBox.

OnApplicationCut(object, ExecutedRoutedEventArgs)

Handles ApplicationCommand.Cut execution.

Declaration

cs-api-definition
protected void OnApplicationCut(object sender, ExecutedRoutedEventArgs e)

Parameters

sender

object

e

ExecutedRoutedEventArgs

OnApplicationPaste(object, ExecutedRoutedEventArgs)

Handles ApplicationCommand.Paste execution.

Declaration

cs-api-definition
protected void OnApplicationPaste(object sender, ExecutedRoutedEventArgs e)

Parameters

sender

object

e

ExecutedRoutedEventArgs

OnApplyTemplate()

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Creates automation peer.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

Returns the automation peer.

OnCultureChanged()

Executed when the Culture changes.

Declaration

cs-api-definition
protected virtual void OnCultureChanged()

OnLoadedOverride(object, RoutedEventArgs)

Called when control is loaded.

Declaration

cs-api-definition
protected virtual void OnLoadedOverride(object sender, RoutedEventArgs e)

Parameters

sender

object

The sender.

e

RoutedEventArgs

The RoutedEventArgs instance containing the event data.

OnMouseEnter(MouseEventArgs)

When the mouse enters the control.

Declaration

cs-api-definition
protected override void OnMouseEnter(MouseEventArgs e)

Parameters

e

MouseEventArgs

Mouse event args.

OnMouseLeave(MouseEventArgs)

When the mouse leaves the control.

Declaration

cs-api-definition
protected override void OnMouseLeave(MouseEventArgs e)

Parameters

e

MouseEventArgs

Mouse event args.

OnMouseWheel(MouseWheelEventArgs)

Handles the MouseWheel.

Declaration

cs-api-definition
protected override void OnMouseWheel(MouseWheelEventArgs e)

Parameters

e

MouseWheelEventArgs

Event args of the MouseWheel.

OnPreviewKeyDown(KeyEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

Declaration

cs-api-definition
protected override void OnPreviewKeyDown(KeyEventArgs e)

Parameters

e

KeyEventArgs

OnSelectionOnFocus(SelectionOnFocus)

Executes when the focus is obtained.

Declaration

cs-api-definition
protected virtual int OnSelectionOnFocus(SelectionOnFocus selectionOnFocus)

Parameters

selectionOnFocus

SelectionOnFocus

The selection on focus.

Returns

int

Returns the selection start to be set when the focus is obtained.

OnUnloadedOverride(object, RoutedEventArgs)

Called when the control is unloaded.

Declaration

cs-api-definition
protected virtual void OnUnloadedOverride(object sender, RoutedEventArgs e)

Parameters

sender

object

The sender.

e

RoutedEventArgs

The RoutedEventArgs instance containing the event data.

OnValueChangedBase(DependencyObject, DependencyPropertyChangedEventArgs, bool)

Executed when the Value property changes.

Declaration

cs-api-definition
protected static void OnValueChangedBase(DependencyObject d, DependencyPropertyChangedEventArgs args, bool processValueChanged)

Parameters

d

DependencyObject

The owner of the value.

args

DependencyPropertyChangedEventArgs

The changed args.

processValueChanged

bool

True is ProcessValueChanged should be called.

ParseMask()

Parses the Mask property and sets the MaskedText.

Declaration

cs-api-definition
protected abstract string ParseMask()

Returns

string

Returns the parsed Mask.

ProcessChar(char)

Process the input when a key has been pressed.

Declaration

cs-api-definition
protected virtual void ProcessChar(char inputSymbol)

Parameters

inputSymbol

char

Remove(int, int, bool)

Removes number of characters from the internal text when no mask.

Declaration

cs-api-definition
protected virtual void Remove(int start, int length, bool checkPositions = true)

Parameters

start

int

The starting index.

length

int

The length.

checkPositions

bool

True, if validation check should be performed on the removed positions.

ReplaceChar(StringBuilder, ref int)

Replaces a char when no mask.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "1#")]
protected virtual void ReplaceChar(StringBuilder text, ref int position)

Parameters

text

StringBuilder

The text builder.

position

int

The position of the char.

ReplacePositionWithPlaceholder(int, bool, bool)

When BackSpace or Delete are pressed, replaces the current char with PlaceHolder.

Declaration

cs-api-definition
protected virtual void ReplacePositionWithPlaceholder(int position, bool useSnapshot, bool forward)

Parameters

position

int

useSnapshot

bool

forward

bool

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

SelectAll()

Selects the whole text.

Declaration

cs-api-definition
public void SelectAll()

SetDefaultStyleKey()

Sets the DefaultStyleKey for the control.

Declaration

cs-api-definition
protected virtual void SetDefaultStyleKey()

SetFromRightOffset(int)

Sets the offset from the right.

Declaration

cs-api-definition
protected virtual void SetFromRightOffset(int offset)

Parameters

offset

int

SetSeparators(params Separator[])

Method that sets predefined separators.

Declaration

cs-api-definition
protected virtual void SetSeparators(params Separator[] separatorsArray)

Parameters

separatorsArray

Separator[]

Array of separators to be set.

StartsWithSeparator(StringBuilder, bool, out Separator)

Checks whether a specified string starts with a separator.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#")]
protected virtual bool StartsWithSeparator(StringBuilder text, bool forward, out Separator separator)

Parameters

text

StringBuilder

The string builder to search in.

forward

bool

Direction of the search - true for forward, false for backward.

separator

Separator

The found separator.

Returns

bool

Returns true if the string starts with a separator.

StartsWithSeparator(StringBuilder, bool, out Separator, ref int)

Checks whether a specified string starts with a separator.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "3#")]
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#")]
protected virtual bool StartsWithSeparator(StringBuilder text, bool forward, out Separator separator, ref int offset)

Parameters

text

StringBuilder

The string builder to search in.

forward

bool

Direction of the search - true for forward, false for backward.

separator

Separator

The found separator.

offset

int

The offset that the search begins from.

Returns

bool

Returns true if the string starts with a separator.

TrimTextStart(string, params char[])

Trims a specified string from certain characters.

Declaration

cs-api-definition
protected static string TrimTextStart(string text, params char[] trimCharacters)

Parameters

text

string

The text to be trimmed.

trimCharacters

char[]

The characters to be trimmed from the text.

Returns

string

Returns the trimmed text.

UpdateEditableTextEndPositions()

Forces updates of the EditableTextEnd and EditableTextStart properties.

Declaration

cs-api-definition
protected void UpdateEditableTextEndPositions()

UpdateEditableTextEndPositionsOverride(ref int, ref int)

Updates the EditableTextEnd and EditableTextStart properties.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "1#")]
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "0#")]
protected virtual void UpdateEditableTextEndPositionsOverride(ref int start, ref int end)

Parameters

start

int

end

int

ValueChangingOverride(RoutedEventArgs)

Performs a pre-value changing checking whether the inherited control allows the ValueChanging(ed) events to be raised.

Declaration

cs-api-definition
protected abstract bool ValueChangingOverride(RoutedEventArgs args)

Parameters

args

RoutedEventArgs

Returns

bool

Returns a boolean flag whether the value change has to be handled or not.

Remarks

If false is returns, the value change proceeds. If true is returned, the update is terminated.

Events

ValueChanged

Occurs when the value is changed.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> ValueChanged

Event Value

EventHandler<RadRoutedEventArgs>

ValueChanging

Occurs before the value is changed.

Declaration

cs-api-definition
public event EventHandler<RadMaskedInputValueChangingEventArgs> ValueChanging

Event Value

EventHandler<RadMaskedInputValueChangingEventArgs>

In this article
DefinitionConstructorsRadMaskedInputBase()FieldsAcceptsReturnPropertyAddSignKeyAllowInvalidValuesPropertyClearButtonStylePropertyClearCommandPropertyCopyCommandPropertyCulturePropertyCutCommandPropertyDecimalCommaKeyDecimalPointKeyDisplayErrorMessagePropertyEmptyContentPropertyEmptyContentTemplatePropertyErrorMessagePropertyErrorMessageTemplatePropertyFormatStringPropertyInputBehaviorPropertyIsClearButtonVisiblePropertyIsLastPositionEditablePropertyIsMaskValidPropertyIsReadOnlyPropertyMaskPropertyNegativeSignKeyOriginalValuePropertyPasteCommandPropertyPlaceholderPropertySectionsNavigationModePropertySelectionOnFocusPropertySpinModePropertyTextBoxStylePropertyTextModePropertyTextPropertyUpdateValueEventPropertyValueChangedEventValueChangingEventValueToTextConverterPropertyPropertiesAcceptsReturnAllowInvalidValuesAllowedDateTimeTokensAllowedModifierTokensAllowedNumericTokensBuilderClearButtonStyleClearCommandCopyCommandCultureCutCommandDisplayErrorMessageEditableTextEndEditableTextLengthEditableTextStartEmptyContentEmptyContentTemplateErrorMessageErrorMessageTemplateEscapedPositionsFormatStringInputBehaviorInputBehaviorResolvedIsClearButtonVisibleIsLastPositionEditableIsMaskValidIsReadOnlyIsRevertingValueIsUsingOneWayBindingIsValueChangingFromInternalIsValueInternalSyncLiteralPositionsMaskMaskResolvedMaskedTextResolvedOriginalValuePasteCommandPlaceholderSectionsNavigationModeSelectionLengthSelectionOnFocusSelectionStartSeparatorsSpinModeTextTextBoxStyleTextModeUpdateValueEventUseBaseNavigationValueToTextConverterMethodsCallSpin(bool)CanModifyChar(char)CanReplaceChar(char)CheckForDataValidationErrors(DependencyProperty, ref MaskValidationResult)ClearSelectionNoMask()CoerceDisplayTextOverride()CoerceImeInputString(string)CoerceInternalValueFromStronglyTypeValueOverride()CoerceStronglyTypeValueFromInternalValueOverride()CoerceTextInternalOverride(ref int)CoerceTextOverride(ref int)CoerceValueOverride()CopyBinding(Binding)FindNextAvailablePosition(bool, int)FindNextSeparatorPosition(bool, int, out Separator)FindNextSeparatorPosition(int)FindPreviousAvailablePositionNoMask()FindPreviousSeparatorPosition(int)GetRightOffset()GetValidCharOverride(char, ref int, bool?, out bool)HandleBackKeyNoMask()HandleBackKeyWithMask()HandleBackKeyWithMaskSelected()HandleClearOverride()HandleDeleteKeyNoMask()HandleDivideKey()HandleEnterKey()HandleLeftKey()HandleMultiplyKey()HandlePaste()HandlePasteNoMask(object, out object)HandlePasteOverride(object, out object)HandleSpaceKey()HandleSpin(int, bool?)HandleSpinNoMask(bool)HandleSubstractKey()HandleTabKeyNoMask()HandleUnknownKeyOverride(int)InsertCharNoMask(char)IsCharValid(char)IsMaskValidOverride()IsPlaceholder(char)IsPlaceholder(int)IsPlaceholder(string)IsSeparator(char)IsSeparator(char, out Separator)IsSeparator(string)IsSeparator(string, out Separator)IsSeparatorNoMask(char)MoveCharactersInInsertBehavior(ref int, char, bool)MoveCharactersInInsertBehaviorOverride(ref int, char, bool)OnApplicationCut(object, ExecutedRoutedEventArgs)OnApplicationPaste(object, ExecutedRoutedEventArgs)OnApplyTemplate()OnCreateAutomationPeer()OnCultureChanged()OnLoadedOverride(object, RoutedEventArgs)OnMouseEnter(MouseEventArgs)OnMouseLeave(MouseEventArgs)OnMouseWheel(MouseWheelEventArgs)OnPreviewKeyDown(KeyEventArgs)OnSelectionOnFocus(SelectionOnFocus)OnUnloadedOverride(object, RoutedEventArgs)OnValueChangedBase(DependencyObject, DependencyPropertyChangedEventArgs, bool)ParseMask()ProcessChar(char)Remove(int, int, bool)ReplaceChar(StringBuilder, ref int)ReplacePositionWithPlaceholder(int, bool, bool)ResetTheme()SelectAll()SetDefaultStyleKey()SetFromRightOffset(int)SetSeparators(params Separator[])StartsWithSeparator(StringBuilder, bool, out Separator)StartsWithSeparator(StringBuilder, bool, out Separator, ref int)TrimTextStart(string, params char[])UpdateEditableTextEndPositions()UpdateEditableTextEndPositionsOverride(ref int, ref int)ValueChangingOverride(RoutedEventArgs)EventsValueChangedValueChanging
Not finding the help you need?
Contact Support