As discussed in the In Depth section of this chapter, you can use month calendar controls to let the user select days of the month; you can see an example in Figure 8.4. Here's the class hierarchy for this control:
Object MarshalByRefObject Component Control MonthCalendar
You can find the more notable public properties of the MonthCalendar class in Table 8.14, the more notable methods in Table 8.15, and the more notable events in Table 8.16. Note that as with other Windows forms controls, I am not listing the notable properties, methods, and events MonthCalendar inherits from the Control class, such as the Click event—you can see all that in Tables 5.1, 5.2, and 5.3, Chapter 5.
Property |
Means |
---|---|
AnnuallyBoldedDates |
Holds an array of DateTime objects specifying which days should be bold. |
BoldedDates |
Gets/sets an array of DateTime objects specifying which dates should be bold. |
CalendarDimensions |
Gets/sets the number of columns and rows. |
FirstDayOfWeek |
Gets/sets the first day of the week. |
MaxDate |
Gets/sets the maximum possible date. |
MaxSelectionCount |
Holds the maximum number of days that can be selected. |
MinDate |
Gets/sets the minimum possible date. |
MonthlyBoldedDates |
Holds the array of DateTime objects which specify which monthly days to display bold. |
ScrollChange |
Holds the scroll rate. |
SelectionEnd |
Gets/sets the end date of a selected range. |
SelectionRange |
Gets the selected range of dates for a month calendar control. |
SelectionStart |
Gets/sets the start date of a selected range of dates. |
ShowToday |
Gets/sets if today's date is shown at the bottom of the control. |
ShowTodayCircle |
Gets/sets if today's date should appear inside a circle. |
ShowWeekNumbers |
Gets/sets if the month calendar control should display week numbers. |
SingleMonthSize |
Returns the minimum size in which to display a month. |
TitleBackColor |
Gets/sets the back color of the calendar's title area. |
TitleForeColor |
Gets/sets the fore color of the calendar's title area. |
TodayDate |
Gets/sets today's date. |
TodayDateSet |
Indicates if the DateTime property has been set. |
Event |
Means |
---|---|
DateChanged |
Occurs when the date in the calendar control changes. |
DateSelected |
Occurs when a date is selected in the calendar. |