Have to click away twice from Calendar in WPF

后端 未结 7 1722
南旧
南旧 2021-02-01 19:17

Edit 2: Thank you all for your feedback. I solved the problem by adding this to my SelectedDatesChanged event:

Mouse.Capture(null);

When I select a

7条回答
  •  难免孤独
    2021-02-01 19:52

    I had the same issue weeks ago, you can use DatePicker which is a control that contains a Calendar, the calendar is displayed once the user clicks a button and when you select a date its automatically closed, the DatePicker Contains also a textbox when the date is visible, you can make it ReadOnly if you want: here a sample code for using DatePicker:

    
            
                
            
        
    

    Hope this helps.

    result :

    result

提交回复
热议问题