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

Using MaskedDateTimeInput control on a touch screen

1 Answer 81 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 02 Feb 2012, 03:19 AM
My application will be running on a laptop with a touch screen, which will be mounted in a police car and used by the officer while driving.  To make things easy on him/her, I'm making the controls large so they'll find the fingers of people with sausage fingers, like my own.

I'm using a MaskedDateTimeInput control on one screen for entering a TimeSpan.  This is going inside of a UserControl with two large RepeatButtons, one with an arrow pointing up and one with an arrow pointing down.  The idea is that the user will tap the screen in the MaskedDateTimeInput control, say in the seconds area.  The user can then tap or hold the RepeatButton with the Up arrow and I want the MaskedDateInput control to treat it as though the user had pressed the up arrow key on the keyboard.  The same goes for the RepeatButton with the down arrow acting like the user had pressed the down arrow key on the keyboard.

How can I get this functionality to work?  There must be some kind of a WPF command defined by the control but I don't know where to find it. 

Also, is it possible to specify how much one press of the up or down arrow key will change the value of the part of the time span it's in?

Tony

1 Answer, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 07 Feb 2012, 10:56 AM
Hello Tony,

 We believe this could be achieved with the RadMaskedDateTimeInput control. When you click/press the seconds or minutes for instance, the control remembers the caret position and the current section that is about to be changed. I you have two Up and Down Buttons on the right of the MaskedInput, in their Click handlers you can use the CallSpin method like so:

maskedDateTimeInpuit.CallSpin(true);
for increasing the current section and
maskedDateTimeInpuit.CallSpin(false);
for decreasing the current section.
Please let us know if this is suitable fro you.


All the best,
Petar Mladenov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Tony
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or