答案 0 :(得分:3)
使用c#可以轻松实现这一目标。说实话,它比为这样一件琐碎的事情写出一种风格要好得多。以下是您的操作方法:
CalendarViewDayItemChanging
CalendarView
个活动
private void CalendarView_CalendarViewDayItemChanging(CalendarView sender, CalendarViewDayItemChangingEventArgs args)
{
if (args.Item.Date.Date.Equals(DateTime.Now.Date))
args.Item.Background = new SolidColorBrush(Colors.Yellow);
}
虽然您的XAML声明如下所示:
<CalendarView CalendarViewDayItemChanging="CalendarView_CalendarViewDayItemChanging"/>
答案 1 :(得分:0)
当IsTodayHighlighted =“ True”为PSYoungGen
时,您需要覆盖以自定义颜色的样式键
SystemControlHighlightAccentBrush