RadMaskedNumericInput does not respect click location when value is 0

0 Answers 25 Views
MaskedInput (Numeric, DateTime, Text, Currency)
Zack
Top achievements
Rank 1
Zack asked on 09 Jul 2025, 08:12 PM

I have a RadMaskedNumericInput as follows:

 


<telerik:RadMaskedNumericInput Grid.Row="0" Grid.Column="1" Width="55"
                       Mask=""
                       FormatString="n2"
                       Value="{Binding TotalFeedVolume}"
                       IsClearButtonVisible="False"
/>

When I click on the left of the initial zero, it moves my cursor right in front of the decimal point. This is a bit frustrating, as I couldn't, for example, just easily make it "10" with one keystroke. Any way to fix this?

Stenly
Telerik team
commented on 10 Jul 2025, 02:46 PM

Hello Zack,

I tested this in a sample project, however, I was unable to reproduce the reported behavior. I attached the test application, so, would it be possible to give it a try and let me know if I am missing something?

Zack
Top achievements
Rank 1
commented on 10 Jul 2025, 02:53 PM

That's weird, because it's happening for me on your project.

The only change I made was to import Telerik.Windows.Controls.Input.for.Wpf.Xaml (2025.2.707) as we're using Nuget instead of the direct installed assemblies.

Zack
Top achievements
Rank 1
commented on 14 Jul 2025, 09:58 PM

Stenly - any additional ideas?
Stenly
Telerik team
commented on 15 Jul 2025, 08:58 AM

Hello Zack, 

I tested it with the Telerik.Windows.Controls.Input.for.Wpf.Xaml (2025.2.707) NuGet package, however, I was not able to reproduce this behavior. Initial click on the control will move the focus to the right side of the 0, however, I can still move the cursor to the left side. I attached a GIF that showcases the observed behavior on my end:

With this in mind, would it be possible to share a GIF or a video that showcases the observed behavior on your end?

 

Zack
Top achievements
Rank 1
commented on 15 Jul 2025, 01:59 PM

That right there is the faulty behavior. It is not respecting where the user clicks (to the left of the zero). This means that if you want to turn 0 into 10 it takes two clicks. It also just feels really weird from a user perspective that where you click isnt where your cursor goes.
Stenly
Telerik team
commented on 17 Jul 2025, 08:51 AM | edited

Hello Zack,

Thank you for the additional information. It was very helpful.

To achieve this requirement, the RadMaskedNumericInput control exposes the SelectionOnFocus property, which you could set to CaretToBeginning. This way, when the user focuses on the element, the caret will be moved to the beginning (left side), which should produce the desired behavior.

More information on this property can be found in the below article:

WPF MaskedInput - Working with Selection - Telerik UI for WPF

With this being said, could you give this suggestion a try?

 

Zack
Top achievements
Rank 1
commented on 17 Jul 2025, 03:03 PM

Thank you for the article. 

The behavior I want is "Unchanged" for SelectionOnFocus. The article claims this is the default value, but I had not set anything and the behavior appears to be using "Default". Could you double check that "Unchanged" is actually the default value?

Stenly
Telerik team
commented on 22 Jul 2025, 10:35 AM

Hello Zack,

Indeed, you are correct. The default value of the SelectionOnFocus dependency property is set to Default, and it is documented incorrectly in our documentation. Due to this, I logged a new item in our internal backlog in order to review the article and update it.

With this in mind, you could set the SelectionOfFocus property to the desired value, which would fit your requirement. 

No answers yet. Maybe you can help?

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Zack
Top achievements
Rank 1
Share this question
or