RadCalendar - Double click on date should add the date

2 posts, 0 answers
  1. Kotteeswari
    Kotteeswari avatar
    1 posts
    Member since:
    Aug 2013

    Posted 07 Aug 2013 Link to this post

    Hi

    When i double click on dates in radcalendar,the selected date should get added.But the date should not get added while double click on the header,navigation arrows and week days? when i click on the arrows to change month, if i do this to fast, the control fires a  "double click" event.

    Is there any way to decide if i clicked a date or some other place on the control? 

    Thanks & Regards
    Kotteeswari

  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 12 Aug 2013 Link to this post

    Hello,

    When setting the MouseDoubleClick directly to the RadCalendar control you are accessing the MouseDoubleClick of the entire control which includes the navigation buttons, borders etc.

    In order to attach only to the buttons in the month view panel of the control you will need to:
    • Directly from the CalendarButtonStyle and set a MouseLeftButtonDown event to the wrapper ff the buttons (in this case a Grid with x:Name="LayoutRoot").
    • After that in the MouseLeftButtonDown use the MouseButtonEventArgs to determine the double click.

    The easiest approach is with the use of Implicit Styles.

    I created and attached a sample project with the previously mentioned approach. The example simply selects today when double click is detected. If you want to access the RadCalendar control from that event without the use of x:Name you will need to drill for it in the visual tree. Hope this is helpful.


    Regards,
    Vladi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top