private void showYear() { CalendarGUIData.HeaderText = _currentYear.ToString(CultureInfo.InvariantCulture); DaysInfo.Clear(); CalendarGUIData.UniformGridColumns = 3; CalendarGUIData.UniformGridRows = 4; for (var i = 0; i < 12; i++) { DaysInfo.Add(new DayInfo { Number = Names.MonthNames[i], FontWeight = FontWeights.Bold, BackgroundBrush = CustomBrushes.HeaderBackground(), BorderBrush = CustomBrushes.HeaderBorderBrush(), Foreground = CustomBrushes.HeaderForeground(), CellWidth = 60, CellHeight = 40 }); } calendarMode = CalendarMode.Year; if (StartAnimation != null) { StartAnimation(); } }
private void initHeader() { CalendarGUIData.UniformGridRows = 5; CalendarGUIData.UniformGridColumns = 7; foreach (var day in Names.DaysOfWeek) { DaysInfo.Add(new DayInfo { Number = day, FontWeight = FontWeights.Bold, BackgroundBrush = CustomBrushes.HeaderBackground(), BorderBrush = CustomBrushes.HeaderBorderBrush(), Foreground = CustomBrushes.HeaderForeground(), CellWidth = 30, HyperlinkIsEnabled = true }); } for (var i = 0; i <= 41; i++) { DaysInfo.Add(new DayInfo { CellWidth = 30 }); } }