public void Draw(SKSurface surface, SKImageInfo info) { var highlightedDays = this.HighlightedDates.TakeWhile(date => { if (date.Year == Date.Year && date.Month == Date.Month) { return(true); } return(false); }).Select(date => date.Day); Model = CalendarMonthModel.Create(this.Date.Year, this.Date.Month, highlightedDays, info.Width, info.Height); CalendarMonthRenderer.Draw(surface, info, Model); }
public CalendarMonthControl() { Date = DateTime.Now; HighlightedDates = new DateTime[] { }; Model = CalendarMonthModel.Create(this.Date.Year, this.Date.Month, new int[] { }, 0, 0); }