Exemplo n.º 1
0
        protected override Style SelectStyleCore(object item, DependencyObject container)
        {
            CalendarAppointmentInfo info = (CalendarAppointmentInfo)item;

            if (info.IsAllDay)
            {
                return(this.AllDayStyle);
            }

            return(this.DefaultStyle);
        }
Exemplo n.º 2
0
        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);
        }