首页 新闻 会员 周边

WPF Calendar 控件毛病?

0
[已关闭问题] 关闭于 2016-03-15 09:00
<Window x:Class="WpfApplication3.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Calendar HorizontalAlignment="Left" Margin="160,74,0,0" 
                  SelectedDatesChanged="Calendar_SelectedDatesChanged"  VerticalAlignment="Top"/>
    </Grid>
</Window>
 private void Calendar_SelectedDatesChanged(object sender, SelectionChangedEventArgs e)
            {
                  var calendar = sender as Calendar;

                  if(calendar.SelectedDate.HasValue)
                        calendar.DisplayDate = calendar.SelectedDate.Value;
            }

在当前月,最后会有下个月的几天,点击1,2,3号能正常跳到这个月,但点击4号以后,就不行,老跳到下下月某号,控件毛病?

Yu的主页 Yu | 专家六级 | 园豆:12980
提问于:2016-03-01 09:32
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册