I have a TabItem which contains a calendar control and a button. The issue is that when the calendar's selected date is the same as the previously selected date, the button takes two clicks to fire its Click event.
I have implemented the selectedDatesChanged event of the calendar to solve this problem when the current selected date is different from the previous selection. The code is as below:
selectedDatesChanged(object sender, SelectionChangedEventArgs e)
{
this.CaptureMouse();
this.ReleaseMouseCapture();
}
What I'm looking for is a way to have the same effect shown in the above function when the selectedDate of the calendar does not differ from the previously selected date. I tried handling the GotFocus and MouseUp events, but it doesn't solve the problem.
Does anyone have any ideas on how I could solve this issue?
Thanks, Naveen