Class
RadMaskedNumericInput

Represents the RadMaskedNumericInput control.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Input")]
[Themable]
public class RadMaskedNumericInput : RadMaskedInputBase

Inheritance: objectRadMaskedInputBaseRadMaskedNumericInput

Inherited Members RadMaskedInputBase.DecimalPointKeyRadMaskedInputBase.DecimalCommaKeyRadMaskedInputBase.NegativeSignKeyRadMaskedInputBase.AddSignKeyRadMaskedInputBase.ValueChangedEventRadMaskedInputBase.ValueChangingEventRadMaskedInputBase.AllowInvalidValuesPropertyRadMaskedInputBase.AcceptsReturnPropertyRadMaskedInputBase.CopyCommandPropertyRadMaskedInputBase.ClearCommandPropertyRadMaskedInputBase.ClearButtonStylePropertyRadMaskedInputBase.CulturePropertyRadMaskedInputBase.CutCommandPropertyRadMaskedInputBase.EmptyContentPropertyRadMaskedInputBase.EmptyContentTemplatePropertyRadMaskedInputBase.ErrorMessagePropertyRadMaskedInputBase.ErrorMessageTemplatePropertyRadMaskedInputBase.FormatStringPropertyRadMaskedInputBase.DisplayErrorMessagePropertyRadMaskedInputBase.InputBehaviorPropertyRadMaskedInputBase.IsClearButtonVisiblePropertyRadMaskedInputBase.IsLastPositionEditablePropertyRadMaskedInputBase.IsReadOnlyPropertyRadMaskedInputBase.IsMaskValidPropertyRadMaskedInputBase.MaskPropertyRadMaskedInputBase.OriginalValuePropertyRadMaskedInputBase.PasteCommandPropertyRadMaskedInputBase.PlaceholderPropertyRadMaskedInputBase.SelectionOnFocusPropertyRadMaskedInputBase.SectionsNavigationModePropertyRadMaskedInputBase.SpinModePropertyRadMaskedInputBase.TextBoxStylePropertyRadMaskedInputBase.TextModePropertyRadMaskedInputBase.UpdateValueEventPropertyRadMaskedInputBase.ValueToTextConverterPropertyRadMaskedInputBase.TextPropertyRadMaskedInputBase.OnApplyTemplate()RadMaskedInputBase.CallSpin(bool)RadMaskedInputBase.SelectAll()RadMaskedInputBase.ResetTheme()RadMaskedInputBase.FindNextAvailablePosition(bool, int)RadMaskedInputBase.MoveCharactersInInsertBehavior(ref int, char, bool)RadMaskedInputBase.ProcessChar(char)RadMaskedInputBase.ReplacePositionWithPlaceholder(int, bool, bool)RadMaskedInputBase.TrimTextStart(string, params char[])RadMaskedInputBase.CopyBinding(Binding)RadMaskedInputBase.OnValueChangedBase(DependencyObject, DependencyPropertyChangedEventArgs, bool)RadMaskedInputBase.CoerceImeInputString(string)RadMaskedInputBase.OnMouseWheel(MouseWheelEventArgs)RadMaskedInputBase.OnCreateAutomationPeer()RadMaskedInputBase.UpdateEditableTextEndPositions()RadMaskedInputBase.UpdateEditableTextEndPositionsOverride(ref int, ref int)RadMaskedInputBase.HandleEnterKey()RadMaskedInputBase.OnApplicationPaste(object, ExecutedRoutedEventArgs)RadMaskedInputBase.OnApplicationCut(object, ExecutedRoutedEventArgs)RadMaskedInputBase.HandlePaste()RadMaskedInputBase.HandleSpaceKey()RadMaskedInputBase.IsMaskValidOverride()RadMaskedInputBase.CheckForDataValidationErrors(DependencyProperty, ref MaskValidationResult)RadMaskedInputBase.IsSeparator(char)RadMaskedInputBase.IsSeparator(char, out Separator)RadMaskedInputBase.IsSeparator(string)RadMaskedInputBase.IsSeparator(string, out Separator)RadMaskedInputBase.IsPlaceholder(char)RadMaskedInputBase.IsPlaceholder(string)RadMaskedInputBase.IsPlaceholder(int)RadMaskedInputBase.StartsWithSeparator(StringBuilder, bool, out Separator)RadMaskedInputBase.StartsWithSeparator(StringBuilder, bool, out Separator, ref int)RadMaskedInputBase.SetSeparators(params Separator[])RadMaskedInputBase.FindNextSeparatorPosition(bool, int, out Separator)RadMaskedInputBase.OnMouseEnter(MouseEventArgs)RadMaskedInputBase.OnMouseLeave(MouseEventArgs)RadMaskedInputBase.SetDefaultStyleKey()RadMaskedInputBase.HandleBackKeyWithMask()RadMaskedInputBase.HandleBackKeyWithMaskSelected()RadMaskedInputBase.OnPreviewKeyDown(KeyEventArgs)RadMaskedInputBase.OnLoadedOverride(object, RoutedEventArgs)RadMaskedInputBase.OnUnloadedOverride(object, RoutedEventArgs)RadMaskedInputBase.HandleDeleteKeyNoMask()RadMaskedInputBase.HandleTabKeyNoMask()RadMaskedInputBase.FindPreviousSeparatorPosition(int)RadMaskedInputBase.FindPreviousAvailablePositionNoMask()RadMaskedInputBase.FindNextSeparatorPosition(int)RadMaskedInputBase.Remove(int, int, bool)RadMaskedInputBase.AllowedNumericTokensRadMaskedInputBase.AllowedDateTimeTokensRadMaskedInputBase.AllowedModifierTokensRadMaskedInputBase.IsUsingOneWayBindingRadMaskedInputBase.IsValueChangingFromInternalRadMaskedInputBase.IsValueInternalSyncRadMaskedInputBase.SeparatorsRadMaskedInputBase.BuilderRadMaskedInputBase.EscapedPositionsRadMaskedInputBase.LiteralPositionsRadMaskedInputBase.MaskResolvedRadMaskedInputBase.MaskedTextResolvedRadMaskedInputBase.EditableTextStartRadMaskedInputBase.EditableTextEndRadMaskedInputBase.EditableTextLengthRadMaskedInputBase.IsRevertingValueRadMaskedInputBase.UseBaseNavigationRadMaskedInputBase.AllowInvalidValuesRadMaskedInputBase.AcceptsReturnRadMaskedInputBase.CopyCommandRadMaskedInputBase.ClearCommandRadMaskedInputBase.ClearButtonStyleRadMaskedInputBase.CultureRadMaskedInputBase.CutCommandRadMaskedInputBase.EmptyContentRadMaskedInputBase.EmptyContentTemplateRadMaskedInputBase.ErrorMessageRadMaskedInputBase.ErrorMessageTemplateRadMaskedInputBase.FormatStringRadMaskedInputBase.DisplayErrorMessageRadMaskedInputBase.InputBehaviorRadMaskedInputBase.IsClearButtonVisibleRadMaskedInputBase.IsLastPositionEditableRadMaskedInputBase.IsReadOnlyRadMaskedInputBase.IsMaskValidRadMaskedInputBase.MaskRadMaskedInputBase.OriginalValueRadMaskedInputBase.PasteCommandRadMaskedInputBase.PlaceholderRadMaskedInputBase.SelectionLengthRadMaskedInputBase.SelectionStartRadMaskedInputBase.SectionsNavigationModeRadMaskedInputBase.SelectionOnFocusRadMaskedInputBase.SpinModeRadMaskedInputBase.TextRadMaskedInputBase.TextBoxStyleRadMaskedInputBase.TextModeRadMaskedInputBase.UpdateValueEventRadMaskedInputBase.ValueToTextConverterRadMaskedInputBase.ValueChangedRadMaskedInputBase.ValueChanging

Constructors

RadMaskedNumericInput()

Initializes a new instance of the RadMaskedNumericInput class.

Declaration

cs-api-definition
public RadMaskedNumericInput()

Fields

AllowSkipPlaceholdersProperty

Identifies the AllowSkipPlaceholders dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AllowSkipPlaceholdersProperty

Field Value

DependencyProperty

AutoFillNumberGroupSeparatorsProperty

Identifies the AutoFillNumberGroupSeparators dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoFillNumberGroupSeparatorsProperty

Field Value

DependencyProperty

AutoFillZerosProperty

Identifies the AutoFillZeros dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoFillZerosProperty

Field Value

DependencyProperty

ValueProperty

Identifies the Value dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ValueProperty

Field Value

DependencyProperty

Properties

AllowSkipPlaceholders

Gets or sets whether input can skip placeholders.

Declaration

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

Property Value

bool

AutoFillNumberGroupSeparators

Gets or sets whether number group separators are auto filled in the mask.

Declaration

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

Property Value

bool

AutoFillZeros

Gets or sets whether trailing zeros should be auto filled.

Declaration

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

Property Value

bool

DecimalSeparator

The Decimal separator for the current culture.

Declaration

cs-api-definition
protected Separator DecimalSeparator { get; set; }

Property Value

Separator

InputBehaviorResolved

Gets or sets the resolved InputBehavior.

Declaration

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

Property Value

InputBehavior

Overrides RadMaskedInputBase.InputBehaviorResolved

IsNegativeValue

Gets or sets whether the number is negative. IsNegative returns True for negative nulls too. In no-masked scenarios, "()", "-" are treated as negative nulls.

Declaration

cs-api-definition
protected virtual bool IsNegativeValue { get; set; }

Property Value

bool

IsPercentageValue

Gets or sets whether the number is percentage.

Declaration

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

Property Value

bool

NegativeSign

The Negative symbol for the current culture.

Declaration

cs-api-definition
protected Separator NegativeSign { get; set; }

Property Value

Separator

NumberSeparator

The Number separator for the current culture.

Declaration

cs-api-definition
protected Separator NumberSeparator { get; set; }

Property Value

Separator

PercentageSign

The Percentage symbol.

Declaration

cs-api-definition
protected Separator PercentageSign { get; set; }

Property Value

Separator

Precision

The precision of the value.

Declaration

cs-api-definition
protected int Precision { get; set; }

Property Value

int

Value

Gets or sets the Value property.

Declaration

cs-api-definition
public double? Value { get; set; }

Property Value

double?

Methods

CanModifyChar(char)

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

Declaration

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

Parameters

character

char

Returns

bool

Overrides RadMaskedInputBase.CanModifyChar(char)

CanReplaceChar(char)

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

Declaration

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

Parameters

character

char

Returns

bool

Overrides RadMaskedInputBase.CanReplaceChar(char)

ClearSelectionNoMask()

Clears the selection when no mask.

Declaration

cs-api-definition
protected override void ClearSelectionNoMask()

Overrides RadMaskedInputBase.ClearSelectionNoMask()

CoerceDisplayTextOverride()

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

Declaration

cs-api-definition
protected override string CoerceDisplayTextOverride()

Returns

string

Returns the display text.

Overrides RadMaskedInputBase.CoerceDisplayTextOverride()

CoerceInternalValueFromStronglyTypeValueOverride()

Coerces the ValueInternal property from the Value property.

Declaration

cs-api-definition
protected override void CoerceInternalValueFromStronglyTypeValueOverride()

Overrides RadMaskedInputBase.CoerceInternalValueFromStronglyTypeValueOverride()

CoerceStronglyTypeValueFromInternalValueOverride()

Coerces the Value property from the ValueInternal property.

Declaration

cs-api-definition
protected override void CoerceStronglyTypeValueFromInternalValueOverride()

Overrides RadMaskedInputBase.CoerceStronglyTypeValueFromInternalValueOverride()

CoerceTextInternalOverride(ref int)

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

Declaration

cs-api-definition
protected override string CoerceTextInternalOverride(ref int selectionStart)

Parameters

selectionStart

int

Returns

string

Returns the string coerced from ValueInternal.

Overrides RadMaskedInputBase.CoerceTextInternalOverride(ref int)

CoerceTextOverride(ref int)

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

Declaration

cs-api-definition
protected override string CoerceTextOverride(ref int selectionStart)

Parameters

selectionStart

int

Returns

string

Returns the string to be coerced.

Overrides RadMaskedInputBase.CoerceTextOverride(ref int)

CoerceValueOverride()

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

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
protected override bool CoerceValueOverride()

Returns

bool

Returns true if the value can be coerced.

Overrides RadMaskedInputBase.CoerceValueOverride()

GetDecimalSeparatorIndex(string)

Gets the index of the decimal separator from a specific text.

Declaration

cs-api-definition
protected int GetDecimalSeparatorIndex(string text)

Parameters

text

string

The text to search in.

Returns

int

Returns the index of the Decimal separator.

GetRightOffset()

Gets the offset from the right.

Declaration

cs-api-definition
protected override int GetRightOffset()

Returns

int

Overrides RadMaskedInputBase.GetRightOffset()

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

Gets the valid char for a position.

Declaration

cs-api-definition
protected override 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.

Overrides RadMaskedInputBase.GetValidCharOverride(char, ref int, bool?, out bool)

GetValueRankFromIndex(int)

Gets the rank of a number in the TextBox in respect to the caret.

Declaration

cs-api-definition
protected int GetValueRankFromIndex(int index)

Parameters

index

int

The index of the caret.

Returns

int

Returns the rank.

HandleBackKeyNoMask()

Handles the Back key when no mask.

Declaration

cs-api-definition
protected override void HandleBackKeyNoMask()

Overrides RadMaskedInputBase.HandleBackKeyNoMask()

HandleClearOverride()

Called, when the Clear command is invoked.

Declaration

cs-api-definition
protected override void HandleClearOverride()

Overrides RadMaskedInputBase.HandleClearOverride()

HandleDivideKey()

Handles the Divide key.

Declaration

cs-api-definition
protected override bool HandleDivideKey()

Returns

bool

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

Overrides RadMaskedInputBase.HandleDivideKey()

HandleLeftKey()

Handles the left key down.

Declaration

cs-api-definition
protected override void HandleLeftKey()

Overrides RadMaskedInputBase.HandleLeftKey()

HandleMultiplyKey()

Handles the Multiply key.

Declaration

cs-api-definition
protected override bool HandleMultiplyKey()

Returns

bool

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

Overrides RadMaskedInputBase.HandleMultiplyKey()

HandlePasteNoMask(object, out object)

Handles paste operation in no-mask scenarios.

Declaration

cs-api-definition
protected override bool HandlePasteNoMask(object value, out object returnString)

Parameters

value

object

returnString

object

Returns

bool

Overrides RadMaskedInputBase.HandlePasteNoMask(object, out object)

HandlePasteOverride(object, out object)

Handles the paste operation.

Declaration

cs-api-definition
protected override 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.

Overrides RadMaskedInputBase.HandlePasteOverride(object, out object)

HandleSpin(int, bool?)

Handle the spin of the value.

Declaration

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

Parameters

position

int

Position of spin.

forwardSpin

bool?

Direction of spin.

Overrides RadMaskedInputBase.HandleSpin(int, bool?)

HandleSpinNoMask(bool)

Handles the spin when no mask.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
protected override void HandleSpinNoMask(bool isUp)

Parameters

isUp

bool

Overrides RadMaskedInputBase.HandleSpinNoMask(bool)

HandleSubstractKey()

Handles the Subtract key.

Declaration

cs-api-definition
protected override bool HandleSubstractKey()

Returns

bool

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

Overrides RadMaskedInputBase.HandleSubstractKey()

HandleUnknownKeyOverride(int)

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

Declaration

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

Parameters

keyCode

int

Key's key code.

Returns

bool

Returns true if the key should not be processed.

Overrides RadMaskedInputBase.HandleUnknownKeyOverride(int)

InsertCharNoMask(char)

Inserts a new character when no mask.

Declaration

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

Parameters

character

char

Overrides RadMaskedInputBase.InsertCharNoMask(char)

InsertSeparatorsOverride(string, int[], string)

Inserts number group separators in the mask.

Declaration

cs-api-definition
protected static string InsertSeparatorsOverride(string mask, int[] groupSizes, string groupSeparator)

Parameters

mask

string

The mask text.

groupSizes

int[]

The group sizes.

groupSeparator

string

The group separator.

Returns

string

Returns the modified string.

IsCharValid(char)

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

Declaration

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

Parameters

character

char

Returns

bool

Overrides RadMaskedInputBase.IsCharValid(char)

IsSeparatorNoMask(char)

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

Declaration

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

Parameters

character

char

Returns

bool

Overrides RadMaskedInputBase.IsSeparatorNoMask(char)

MoveCharactersInInsertBehaviorOverride(ref int, char, bool)

Moves a group characters from the specified position to the left one position from the last Placeholder.

Declaration

cs-api-definition
protected override 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.

Overrides RadMaskedInputBase.MoveCharactersInInsertBehaviorOverride(ref int, char, bool)

Remarks

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

OnCultureChanged()

Executed when the Culture changes.

Declaration

cs-api-definition
protected override void OnCultureChanged()

Overrides RadMaskedInputBase.OnCultureChanged()

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnSelectionOnFocus(SelectionOnFocus)

Executes when the focus is obtained.

Declaration

cs-api-definition
protected override 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.

Overrides RadMaskedInputBase.OnSelectionOnFocus(SelectionOnFocus)

ParseMask()

Parses the Mask property and sets the MaskedText.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
protected override string ParseMask()

Returns

string

Returns the parsed Mask.

Overrides RadMaskedInputBase.ParseMask()

ReplaceChar(StringBuilder, ref int)

Replaces a char when no mask.

Declaration

cs-api-definition
protected override void ReplaceChar(StringBuilder text, ref int position)

Parameters

text

StringBuilder

The text builder.

position

int

The position of the char.

Overrides RadMaskedInputBase.ReplaceChar(StringBuilder, ref int)

SetFromRightOffset(int)

Sets the offset from the right.

Declaration

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

Parameters

offset

int

Overrides RadMaskedInputBase.SetFromRightOffset(int)

ToggleNegativeSignKey()

Toggles the visibility of the Negative symbol.

Declaration

cs-api-definition
protected void ToggleNegativeSignKey()

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 override bool ValueChangingOverride(RoutedEventArgs args)

Parameters

args

RoutedEventArgs

Returns

bool

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

Overrides RadMaskedInputBase.ValueChangingOverride(RoutedEventArgs)

Remarks

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