skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadMaskedNumericInput

Represents the RadMaskedNumericInput control.

Inheritance
System.Object
RadMaskedInputBase
RadMaskedNumericInput
Inherited Members
RadMaskedInputBase.DecimalPointKey
RadMaskedInputBase.DecimalCommaKey
RadMaskedInputBase.NegativeSignKey
RadMaskedInputBase.AddSignKey
RadMaskedInputBase.ValueChangedEvent
RadMaskedInputBase.ValueChangingEvent
RadMaskedInputBase.AllowInvalidValuesProperty
RadMaskedInputBase.AcceptsReturnProperty
RadMaskedInputBase.CopyCommandProperty
RadMaskedInputBase.ClearCommandProperty
RadMaskedInputBase.ClearButtonStyleProperty
RadMaskedInputBase.CultureProperty
RadMaskedInputBase.CutCommandProperty
RadMaskedInputBase.EmptyContentProperty
RadMaskedInputBase.EmptyContentTemplateProperty
RadMaskedInputBase.ErrorMessageProperty
RadMaskedInputBase.ErrorMessageTemplateProperty
RadMaskedInputBase.FormatStringProperty
RadMaskedInputBase.DisplayErrorMessageProperty
RadMaskedInputBase.InputBehaviorProperty
RadMaskedInputBase.IsClearButtonVisibleProperty
RadMaskedInputBase.IsLastPositionEditableProperty
RadMaskedInputBase.IsReadOnlyProperty
RadMaskedInputBase.IsMaskValidProperty
RadMaskedInputBase.MaskProperty
RadMaskedInputBase.OriginalValueProperty
RadMaskedInputBase.PasteCommandProperty
RadMaskedInputBase.PlaceholderProperty
RadMaskedInputBase.SelectionOnFocusProperty
RadMaskedInputBase.SectionsNavigationModeProperty
RadMaskedInputBase.SpinModeProperty
RadMaskedInputBase.TextBoxStyleProperty
RadMaskedInputBase.TextModeProperty
RadMaskedInputBase.UpdateValueEventProperty
RadMaskedInputBase.ValueToTextConverterProperty
RadMaskedInputBase.IsEmptyProperty
RadMaskedInputBase.HasErrorsProperty
RadMaskedInputBase.TextProperty
RadMaskedInputBase.OnApplyTemplate()
RadMaskedInputBase.CallSpin(Boolean)
RadMaskedInputBase.SelectAll()
RadMaskedInputBase.ResetTheme()
RadMaskedInputBase.FindNextAvailablePosition(Boolean, Int32)
RadMaskedInputBase.MoveCharactersInInsertBehavior(Int32, Char, Boolean)
RadMaskedInputBase.ProcessChar(Char)
RadMaskedInputBase.ReplacePositionWithPlaceholder(Int32, Boolean, Boolean)
RadMaskedInputBase.TrimTextStart(String, Char[])
RadMaskedInputBase.CopyBinding(Binding)
RadMaskedInputBase.OnValueChangedBase(DependencyObject, DependencyPropertyChangedEventArgs, Boolean)
RadMaskedInputBase.CoerceImeInputString(String)
RadMaskedInputBase.OnMouseWheel(MouseWheelEventArgs)
RadMaskedInputBase.OnCreateAutomationPeer()
RadMaskedInputBase.UpdateEditableTextEndPositions()
RadMaskedInputBase.UpdateEditableTextEndPositionsOverride(Int32, Int32)
RadMaskedInputBase.HandleEnterKey()
RadMaskedInputBase.OnApplicationPaste(Object, ExecutedRoutedEventArgs)
RadMaskedInputBase.OnApplicationCut(Object, ExecutedRoutedEventArgs)
RadMaskedInputBase.HandlePaste()
RadMaskedInputBase.HandleSpaceKey()
RadMaskedInputBase.IsMaskValidOverride()
RadMaskedInputBase.CheckForDataValidationErrors(DependencyProperty, MaskValidationResult)
RadMaskedInputBase.IsSeparator(Char)
RadMaskedInputBase.IsSeparator(Char, Separator)
RadMaskedInputBase.IsSeparator(String)
RadMaskedInputBase.IsSeparator(String, Separator)
RadMaskedInputBase.IsPlaceholder(Char)
RadMaskedInputBase.IsPlaceholder(String)
RadMaskedInputBase.IsPlaceholder(Int32)
RadMaskedInputBase.StartsWithSeparator(StringBuilder, Boolean, Separator)
RadMaskedInputBase.StartsWithSeparator(StringBuilder, Boolean, Separator, Int32)
RadMaskedInputBase.SetSeparators(Separator[])
RadMaskedInputBase.FindNextSeparatorPosition(Boolean, Int32, 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(Int32)
RadMaskedInputBase.FindPreviousAvailablePositionNoMask()
RadMaskedInputBase.FindNextSeparatorPosition(Int32)
RadMaskedInputBase.Remove(Int32, Int32, Boolean)
RadMaskedInputBase.AllowedNumericTokens
RadMaskedInputBase.AllowedDateTimeTokens
RadMaskedInputBase.AllowedModifierTokens
RadMaskedInputBase.IsUsingOneWayBinding
RadMaskedInputBase.IsValueChangingFromInternal
RadMaskedInputBase.IsValueInternalSync
RadMaskedInputBase.Separators
RadMaskedInputBase.Builder
RadMaskedInputBase.EscapedPositions
RadMaskedInputBase.LiteralPositions
RadMaskedInputBase.MaskResolved
RadMaskedInputBase.MaskedTextResolved
RadMaskedInputBase.EditableTextStart
RadMaskedInputBase.EditableTextEnd
RadMaskedInputBase.EditableTextLength
RadMaskedInputBase.IsRevertingValue
RadMaskedInputBase.UseBaseNavigation
RadMaskedInputBase.AllowInvalidValues
RadMaskedInputBase.AcceptsReturn
RadMaskedInputBase.CopyCommand
RadMaskedInputBase.ClearCommand
RadMaskedInputBase.ClearButtonStyle
RadMaskedInputBase.Culture
RadMaskedInputBase.CutCommand
RadMaskedInputBase.EmptyContent
RadMaskedInputBase.EmptyContentTemplate
RadMaskedInputBase.ErrorMessage
RadMaskedInputBase.ErrorMessageTemplate
RadMaskedInputBase.FormatString
RadMaskedInputBase.DisplayErrorMessage
RadMaskedInputBase.InputBehavior
RadMaskedInputBase.IsClearButtonVisible
RadMaskedInputBase.IsLastPositionEditable
RadMaskedInputBase.IsReadOnly
RadMaskedInputBase.IsMaskValid
RadMaskedInputBase.Mask
RadMaskedInputBase.OriginalValue
RadMaskedInputBase.PasteCommand
RadMaskedInputBase.Placeholder
RadMaskedInputBase.SelectionLength
RadMaskedInputBase.SelectionStart
RadMaskedInputBase.SectionsNavigationMode
RadMaskedInputBase.SelectionOnFocus
RadMaskedInputBase.SpinMode
RadMaskedInputBase.Text
RadMaskedInputBase.TextBoxStyle
RadMaskedInputBase.TextMode
RadMaskedInputBase.UpdateValueEvent
RadMaskedInputBase.ValueToTextConverter
RadMaskedInputBase.IsEmpty
RadMaskedInputBase.HasErrors
RadMaskedInputBase.ValueChanged
RadMaskedInputBase.ValueChanging
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input.dll

Syntax

[TelerikToolboxCategory("Input")]
[Themable]
public class RadMaskedNumericInput : RadMaskedInputBase, IThemable

Constructors

RadMaskedNumericInput()

Initializes a new instance of the RadMaskedNumericInput class.

Declaration
public RadMaskedNumericInput()

Fields

AllowSkipPlaceholdersProperty

Identifies the AllowSkipPlaceholders dependency property.

Declaration
public static readonly DependencyProperty AllowSkipPlaceholdersProperty
Field Value
System.Windows.DependencyProperty

AutoFillNumberGroupSeparatorsProperty

Identifies the AutoFillNumberGroupSeparators dependency property.

Declaration
public static readonly DependencyProperty AutoFillNumberGroupSeparatorsProperty
Field Value
System.Windows.DependencyProperty

AutoFillZerosProperty

Identifies the AutoFillZeros dependency property.

Declaration
public static readonly DependencyProperty AutoFillZerosProperty
Field Value
System.Windows.DependencyProperty

ValueProperty

Identifies the Value dependency property.

Declaration
public static readonly DependencyProperty ValueProperty
Field Value
System.Windows.DependencyProperty

Properties

AllowSkipPlaceholders

Gets or sets whether input can skip placeholders.

Declaration
public bool AllowSkipPlaceholders { get; set; }
Property Value
System.Boolean

AutoFillNumberGroupSeparators

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

Declaration
public bool AutoFillNumberGroupSeparators { get; set; }
Property Value
System.Boolean

AutoFillZeros

Gets or sets whether trailing zeros should be auto filled.

Declaration
public bool AutoFillZeros { get; set; }
Property Value
System.Boolean

DecimalSeparator

The Decimal separator for the current culture.

Declaration
protected Separator DecimalSeparator { get; set; }
Property Value
Separator

InputBehaviorResolved

Gets or sets the resolved InputBehavior.

Declaration
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
protected virtual bool IsNegativeValue { get; set; }
Property Value
System.Boolean

IsPercentageValue

Gets or sets whether the number is percentage.

Declaration
protected bool IsPercentageValue { get; set; }
Property Value
System.Boolean

NegativeSign

The Negative symbol for the current culture.

Declaration
protected Separator NegativeSign { get; set; }
Property Value
Separator

NumberSeparator

The Number separator for the current culture.

Declaration
protected Separator NumberSeparator { get; set; }
Property Value
Separator

PercentageSign

The Percentage symbol.

Declaration
protected Separator PercentageSign { get; set; }
Property Value
Separator

Precision

The precision of the value.

Declaration
protected int Precision { get; set; }
Property Value
System.Int32

Value

Gets or sets the Value property.

Declaration
public Nullable<double> Value { get; set; }
Property Value
System.Nullable<System.Double>

Methods

CanModifyChar(Char)

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

Declaration
protected override bool CanModifyChar(char character)
Parameters
System.Char character

Returns
System.Boolean

Overrides
RadMaskedInputBase.CanModifyChar(Char)

CanReplaceChar(Char)

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

Declaration
protected override bool CanReplaceChar(char character)
Parameters
System.Char character

Returns
System.Boolean

Overrides
RadMaskedInputBase.CanReplaceChar(Char)

ClearSelectionNoMask()

Clears the selection when no mask.

Declaration
protected override void ClearSelectionNoMask()
Overrides
RadMaskedInputBase.ClearSelectionNoMask()

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
RadMaskedInputBase.CoerceDisplayTextOverride()

CoerceInternalValueFromStronglyTypeValueOverride()

Coerces the ValueInternal property from the Value property.

Declaration
protected override void CoerceInternalValueFromStronglyTypeValueOverride()
Overrides
RadMaskedInputBase.CoerceInternalValueFromStronglyTypeValueOverride()

CoerceStronglyTypeValueFromInternalValueOverride()

Coerces the Value property from the ValueInternal property.

Declaration
protected override void CoerceStronglyTypeValueFromInternalValueOverride()
Overrides
RadMaskedInputBase.CoerceStronglyTypeValueFromInternalValueOverride()

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

Returns
System.String

Returns the string coerced from ValueInternal.

Overrides
RadMaskedInputBase.CoerceTextInternalOverride(ref Int32)

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

Returns
System.String

Returns the string to be coerced.

Overrides
RadMaskedInputBase.CoerceTextOverride(ref Int32)

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
RadMaskedInputBase.CoerceValueOverride()

GetDecimalSeparatorIndex(String)

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

Declaration
protected int GetDecimalSeparatorIndex(string text)
Parameters
System.String text

The text to search in.

Returns
System.Int32

Returns the index of the Decimal separator.

GetRightOffset()

Gets the offset from the right.

Declaration
protected override int GetRightOffset()
Returns
System.Int32

Overrides
RadMaskedInputBase.GetRightOffset()

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, Nullable<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
RadMaskedInputBase.GetValidCharOverride(Char, ref Int32, Nullable<Boolean>, out Boolean)

GetValueRankFromIndex(Int32)

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

Declaration
protected int GetValueRankFromIndex(int index)
Parameters
System.Int32 index

The index of the caret.

Returns
System.Int32

Returns the rank.

HandleBackKeyNoMask()

Handles the Back key when no mask.

Declaration
protected override void HandleBackKeyNoMask()
Overrides
RadMaskedInputBase.HandleBackKeyNoMask()

HandleClearOverride()

Called, when the Clear command is invoked.

Declaration
protected override void HandleClearOverride()
Overrides
RadMaskedInputBase.HandleClearOverride()

HandleDivideKey()

Handles the Divide key.

Declaration
protected override bool HandleDivideKey()
Returns
System.Boolean

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

Overrides
RadMaskedInputBase.HandleDivideKey()

HandleLeftKey()

Handles the left key down.

Declaration
protected override void HandleLeftKey()
Overrides
RadMaskedInputBase.HandleLeftKey()

HandleMultiplyKey()

Handles the Multiply key.

Declaration
protected override bool HandleMultiplyKey()
Returns
System.Boolean

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
protected override bool HandlePasteNoMask(object value, out object returnString)
Parameters
System.Object value

System.Object returnString

Returns
System.Boolean

Overrides
RadMaskedInputBase.HandlePasteNoMask(Object, out Object)

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
RadMaskedInputBase.HandlePasteOverride(Object, out Object)

HandleSpin(Int32, Nullable<Boolean>)

Handle the spin of the value.

Declaration
protected override void HandleSpin(int position, Nullable<bool> forwardSpin)
Parameters
System.Int32 position

Position of spin.

System.Nullable<System.Boolean> forwardSpin

Direction of spin.

Overrides
RadMaskedInputBase.HandleSpin(Int32, Nullable<Boolean>)

HandleSpinNoMask(Boolean)

Handles the spin when no mask.

Declaration
protected override void HandleSpinNoMask(bool isUp)
Parameters
System.Boolean isUp

Overrides
RadMaskedInputBase.HandleSpinNoMask(Boolean)

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
RadMaskedInputBase.HandleSubstractKey()

HandleUnknownKeyOverride(Int32)

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

Declaration
protected override bool HandleUnknownKeyOverride(int keyCode)
Parameters
System.Int32 keyCode

Key's key code.

Returns
System.Boolean

Returns true if the key should not be processed.

Overrides
RadMaskedInputBase.HandleUnknownKeyOverride(Int32)

InsertCharNoMask(Char)

Inserts a new character when no mask.

Declaration
protected override void InsertCharNoMask(char character)
Parameters
System.Char character

Overrides
RadMaskedInputBase.InsertCharNoMask(Char)

InsertSeparatorsOverride(String, Int32[], String)

Inserts number group separators in the mask.

Declaration
protected static string InsertSeparatorsOverride(string mask, int[] groupSizes, string groupSeparator)
Parameters
System.String mask

The mask text.

System.Int32[] groupSizes

The group sizes.

System.String groupSeparator

The group separator.

Returns
System.String

Returns the modified string.

IsCharValid(Char)

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

Declaration
protected override bool IsCharValid(char character)
Parameters
System.Char character

The character.

Returns
System.Boolean

Overrides
RadMaskedInputBase.IsCharValid(Char)

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
RadMaskedInputBase.IsSeparatorNoMask(Char)

MoveCharactersInInsertBehaviorOverride(ref Int32, Char, Boolean)

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

Declaration
protected override void MoveCharactersInInsertBehaviorOverride(ref int position, char character, bool forward)
Parameters
System.Int32 position

The position from which the move has to be done.

System.Char character

The character input at this position.

System.Boolean forward

The direction of the moving.

Overrides
RadMaskedInputBase.MoveCharactersInInsertBehaviorOverride(ref Int32, Char, Boolean)
Remarks

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

OnCultureChanged()

Executed when the Culture changes.

Declaration
protected override void OnCultureChanged()
Overrides
RadMaskedInputBase.OnCultureChanged()

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.

OnSelectionOnFocus(SelectionOnFocus)

Executes when the focus is obtained.

Declaration
protected override int OnSelectionOnFocus(SelectionOnFocus selectionOnFocus)
Parameters
SelectionOnFocus selectionOnFocus

The selection on focus.

Returns
System.Int32

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
protected override string ParseMask()
Returns
System.String

Returns the parsed Mask.

Overrides
RadMaskedInputBase.ParseMask()

ReplaceChar(StringBuilder, ref Int32)

Replaces a char when no mask.

Declaration
protected override void ReplaceChar(StringBuilder text, ref int position)
Parameters
System.Text.StringBuilder text

The text builder.

System.Int32 position

The position of the char.

Overrides
RadMaskedInputBase.ReplaceChar(StringBuilder, ref Int32)

SetFromRightOffset(Int32)

Sets the offset from the right.

Declaration
protected override void SetFromRightOffset(int offset)
Parameters
System.Int32 offset

Overrides
RadMaskedInputBase.SetFromRightOffset(Int32)

ToggleNegativeSignKey()

Toggles the visibility of the Negative symbol.

Declaration
protected void ToggleNegativeSignKey()

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
RadMaskedInputBase.ValueChangingOverride(RoutedEventArgs)
Remarks

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

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.