title: WPF button takes two clicks to fire Click event
body: <p>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.</p>
  
  <p>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:</p>
  
  <pre><code>selectedDatesChanged(object sender, SelectionChangedEventArgs e)
  {
      this.CaptureMouse();
      this.ReleaseMouseCapture();
  }
  </code></pre>
  
  <p>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.</p>
  
  <p>Does anyone have any ideas on how I could solve this issue?</p>
  
  <p>Thanks,
  Naveen</p>