This is a migrated thread and some comments may be shown as answers.

[Solved] NumericBox suppresses OnKeyDown for . and -

2 Answers 21 Views
NumericBox for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mark
Top achievements
Rank 1
Mark asked on 04 Jul 2013, 03:57 PM

Hi,

RadNumericBox seems to suppress the call to OnKeyDown for the keys '.' and '-' but does call it for most other keys it considers valid (digits, left arrow, right arrow, delete, backspace). Can you confirm that this is true? If so, is this by design?

I can see suppressing the call for invalid keys like 'a' - 'z' but it seems inconsistent to call it for some valid keys and not others.I am trying to restrict user input to nonnegative integers so I do not want to allow . or - in the input and this behavior is preventing me from doing that customization cleanly.

Thanks!

Mark

Edited to add : I'm using C#/XAML so perhaps this issue isn't too important because I cannot really create a derived class as I would like to. This reminds me why I really don't like the complexity and limitations of COM.

2 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 08 Jul 2013, 04:34 PM
Hi Mark,

Thank you for contacting us.

I must confirm that when such special character is typed, we mark this event as handled. This is intentional and the reason is that otherwise handling these characters causes the MS TextBox control to flicker.

If you have any other questions, do not hesitate to contact us again.

 

Regards,
Ivaylo Gergov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mark
Top achievements
Rank 1
answered on 08 Jul 2013, 05:12 PM
Ok, thank you very much for checking.
Tags
NumericBox for XAML
Asked by
Mark
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Mark
Top achievements
Rank 1
Share this question
or