Hello,
In my MAUI application I want to use:
<telerik:RadNumericInput Value="{Binding Gamma, Mode=TwoWay}" StringFormat="{}{0:F1}" Minimum="0" Maximum="4.0" Step="0.1" />
The problem is, I can't type in e.g. "2.1", I type "2." and after I type 1 it make a 4.0 out of it. But I can type "2 " in it and use the buttons to select "2.1".
That's a pretty simple use case, what am I doing wrong?
Thanks,
Harald
I tested on windows and no issues. I have used a physical keyboard. I have attached a video. I pressed dot also comma key and dot is entered in the numeric control.
Additional info:
Please send a video of the behavior on your side and explain in what cases the issue happens.
What are the .NET and .NET Maui versions you use? You can also send a sample app in which the issue happens.
I appreciate the provided video. I have followed your steps to reproduce this behavior but to no avail. It seems to me that this could be related to the environment or to some other settings. Here are the steps performed on my side.
In the following gif, I type 2 and then try to type a different number. It does not lead to the maximum property value.
In general, if I type a number bigger than the Maximum value, it will be rejected, and the maximum value will be applied. In our case, typing 5 while 4 is maximum, the number 4 will appear as a new value. What you can check on your side is if in some scenario, the control value is not changed programmatically to a bigger value.
In addition, while testing your scenario, I noticed that when using the up/down key, at some point, the value is not correctly rounded. Can you check if this is reproducible on your side?
Thank you for the additional details. I'm still unable to reproduce this behavior. At this point, I am not aware of how the German keyboard layout is related to the reported behavior. My guess is that the German keyboard layout could have different values for specific keys.
What comes to my mind is trying to use NumericValidationBehavior to validate the input. This way, we could check if an invalid symbol is entered while typing.
Nevertheless, I am happy to hear that you have found a workaround for this behavior, and I hope that you can use it. If you have any other questions, feel free to contact us again in a new thread.