简体   繁体   English

在WPF日历控件中设置显示月份

[英]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? 您是否尝试过使用DisplayDate属性? More here . 更多这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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