protected override Style SelectStyleCore(object item, DependencyObject container) { CalendarAppointmentInfo info = (CalendarAppointmentInfo)item; if (info.IsAllDay) { return(this.AllDayStyle); } return(this.DefaultStyle); }
protected override DataTemplate SelectTemplateCore(CalendarAppointmentInfo context, CalendarCellModel cell) { if (string.IsNullOrEmpty(context.Subject)) { return(null); } if (context.Date.HasValue && context.Date.Value.Date == DateTime.Now.Date) { return(this.DefaultTemplate); } return(this.SpecialTemplate); }