New to Telerik UI for WPF? Download free 30-day trial

How to Define Consecutive Input

In the RadMaskedNumericInput and RadMaskedCurrencyInput controls if in the user input is similar to 4_5,_12,345, each placeholder indicating that no value is added is replaced by a 0, thus displaying the value of 405,012,345:

Example 1: Each placeholder is replaced by 0

<telerik:RadMaskedNumericInput HorizontalAlignment="Center" 
                               Culture="en-US" 
                               EmptyContent="Enter digits" 
                               Mask="#9.0" 
                               SelectionOnFocus="SelectAll" 
                               SpinMode="PositionAndValue" 
                               TextMode="PlainText" 
                               UpdateValueEvent="LostFocus" 
                               Value="12345" /> 

WPF RadMaskedInput Placeholders Replaced with 0

However, if you need to define a consecutive input so that entering a new digit to this number _____,12,345_ will result in adding the digit to the first available position: _____,412,345__, you can set the AllowSkipPlaceholders property to False:

Example 2: Setting the AllowSkipPlaceholders property

<telerik:RadMaskedNumericInput HorizontalAlignment="Center" 
                               AllowSkipPlaceholders="False" 
                               Culture="en-US" 
                               EmptyContent="Enter digits" 
                               Mask="#9.0" 
                               SelectionOnFocus="SelectAll" 
                               SpinMode="PositionAndValue" 
                               TextMode="PlainText" 
                               UpdateValueEvent="LostFocus" 
                               Value="12345" /> 

WPF RadMaskedInput Skipped Placeholders

In this article