Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1325
Recognize click on a day
posted

How could I determine if user clicked on a day?

  • 1325
    Offline posted in reply to John Doe

    Thank you, Alex.

  • 69686
    Verified Answer
    posted

    Hello,

    You can handle the SelectedDatesChanged event, which is fired when you click on a day or you can use PreviewMouseLeftButtonDown event :

     

    void xamMonthCalendar1_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)

            {

                CalendarDay day = Infragistics.Windows.Utilities.GetAncestorFromType(e.OriginalSource as DependencyObject, typeof(CalendarDay), true) as CalendarDay;

                if (day != null)

                {

                    Debug.WriteLine("Selected Date in preview button down");

                }

            }