Imports GrapeCity.Win.CalendarGrid
Dim template As New CalendarTemplate()
template.RowHeaderVisible = False
template.ColumnCount = 1
template.RowCount = 4
template.ColumnHeader(0, 0).DateFormat = "{DayOfWeek}"
template.ColumnHeader(0, 0).DateFormatType = CalendarDateFormatType.CalendarGrid
template.ColumnHeader(0, 0).CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter
template.Content(0, 0).DateFormat = "d日"
template.Content(0, 0).DateFormatType = CalendarDateFormatType.DotNet
GcCalendarGrid1.GridLines.HorizontalTableGridLine = new CalendarBorderLine(Color.Empty, BorderLineStyle.None)
GcCalendarGrid1.GridLines.VerticalTableGridLine = new CalendarBorderLine(Color.Empty, BorderLineStyle.None)
template.Content(3, 0).CellStyle.BackColor = Color.LightBlue
template.Content(3, 0).CanFocus = false
template.Content.Rows(3).Height = 5
template.Content.Columns(0).Width = 100
gcCalendarGrid1.Template = template
Dim weekView As New CalendarWeekView()
weekView.WeekCount = 4
GcCalendarGrid1.CalendarView = weekView
using GrapeCity.Win.CalendarGrid;
var template = new CalendarTemplate();
template.RowHeaderVisible = false;
template.ColumnCount = 1;
template.RowCount = 4;
template.ColumnHeader[0, 0].DateFormat = "{DayOfWeek}";
template.ColumnHeader[0, 0].DateFormatType = CalendarDateFormatType.CalendarGrid;
template.ColumnHeader[0, 0].CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter;
template.Content[0, 0].DateFormat = "d日";
template.Content[0, 0].DateFormatType = CalendarDateFormatType.DotNet;
gcCalendarGrid1.GridLines.HorizontalTableGridLine = new CalendarBorderLine(Color.Empty, BorderLineStyle.None);
gcCalendarGrid1.GridLines.VerticalTableGridLine = new CalendarBorderLine(Color.Empty, BorderLineStyle.None);
template.Content[3, 0].CellStyle.BackColor = Color.LightBlue;
template.Content[3, 0].CanFocus = false;
template.Content.Rows[3].Height = 5;
template.Content.Columns[0].Width = 100;
gcCalendarGrid1.Template = template;
var weekView = new CalendarWeekView();
weekView.WeekCount = 4;
gcCalendarGrid1.CalendarView = weekView;