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

RadCalendar - Double click on date should add the date

1 Answer 157 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Kotteeswari
Top achievements
Rank 1
Kotteeswari asked on 07 Aug 2013, 09:25 AM

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

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 12 Aug 2013, 11:20 AM
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 >>
Tags
Calendar
Asked by
Kotteeswari
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or