Using MaskedDateTimeInput control on a touch screen

2 posts, 1 answers
  1. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 01 Feb 2012 Link to this post

    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?

  2. Answer
    Petar Mladenov
    Petar Mladenov avatar
    3164 posts

    Posted 07 Feb 2012 Link to this post

    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:

    for increasing the current section and
    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 >>
Back to Top