文章出處
文章列表
主面板上有一個Calendar控件,點擊選擇了日期后,如果點擊確認按鈕,需要點擊兩次。這個問題的解決方法如下:
private void calendar1_PreviewMouseUp(object sender, MouseButtonEventArgs e)
{
if (Mouse.Captured is CalendarItem)
{
Mouse.Capture(null);
}
}
本人親自驗證。
文章列表
全站熱搜