WPF button takes two clicks to fire Click event

后端 未结 2 853
南笙
南笙 2021-02-20 15:51

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 tak

2条回答
  •  甜味超标
    2021-02-20 16:26

    You could simply write:

    Mouse.Capture(null);
    

    This will solve the issue of mouse holding focus

提交回复
热议问题