[]
This quick start gets you started with the CalendarView control by letting you create a WinForms application, add CalendarView control to it, and set a specific date in CalendarView.
To quickly get started using the control, follow these steps:
Create a Windows Forms App in Visual Studio.
Add the following assemblies (dependant assemblies for CalendarView control):
Drag and drop the CalendarView control from the Toolbox to the form.
Set the Name property of CalendarView control to 'calendarView' by navigating to the Properties window. Alternatively, you can also initialize the CalendarView control via the code editor as given below:
C1CalendarView calendarView = new C1CalendarView();
Set the location for CalendarView control using the Location property:
// Set CalendarView location
calendarView.Location = new System.Drawing.Point(300, 152);
Use the BoldedDates property and set it to a DateTime array, to make the four consecutive days after the current day as bold.
calendarView.BoldedDates = new DateTime[]
{
DateTime.Today.AddDays(1),
DateTime.Today.AddDays(2),
DateTime.Today.AddDays(3),
DateTime.Today.AddDays(4)
};
Set a background color for the CalendarView control:
// Set Background color
calendarView.BackColor = Color.Beige;