简体   繁体   中英

Set display month in WPF Calendar control

When I display my Calendar, I select a certain date by default:

myCalendar.SelectedDate = myDateTime;

The problem is that the month that is displayed doesn't change. It stays at the current month. I searched high and low for a way to display a certain month.

How can I force the Calendar to display the month that contains the selected date?

Have you tried using the DisplayDate property? More here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM