Welcome, Guest  :: Login 

ScheduleSet.Calendars Namespace

RichCalendar Component

Calendar component for displaying dates in weeks. It fills the given area with month calendars, recalculating the layout dynamically when resized.

RichCalendar Anatomy

Header - can contain some text and an icon. Header can be hidden. The appearance can be set through its own style properties.

Month Header - displays formattable name of the month and contains the navigation. Navigation can be done using Month Selector (drop down button opening MonthSelector component), Arrows or it can be turned off. The appearance of the Month Header can be set through its own style properties. Month Header can be also hidden.

Week Day Names Row - can be hidden. The appearance can be set through its own style properties. Each week day can have its own style defined. By clicking the WeekDay name you can select for example all Wednesdays in the month.

Week Numbers Column - can be hidden. The appearance can be set through its own style properties. The whole week can be selected by clicking the Week Number. When both WeekDay names and Week Numbers are displayed, whole month can be selected by clicking the top-left corner.

Days Area - the appearance can be set separately for normal days, selected days, holiday dates and trailing days (days displayed but in fact belonging to months out of calendar range). Selected dates are defined through the SelectedDates collection, holiday dates through HolidayDates collection. Trailing days can be hidden.

Footer - can be hidden. It can contain some text, usually today's date, which can be used as a button for selecting today's date. The appearance can be set through its own style properties.

Today's Date - can be highlighted and has its own style definition.

RichCalendar Appearance

RichCalendar provides rich style hierarchy for setting the desired appearance. It allows to define style for each individual part, including Header, Footer, Month area, Month Header, Week Days and Week Numbers. Days have one common style and multiple style options for defining special appearance, such as selected days, holidays, days of week, days with special events etc. The space between months and days can be set with CalendarGap and DayGap properties.
Several predefined styles are available in designer with possibility to be easily turned to different color scheme with the ThemeStyle setting. The Theme Style allows you to update the color scheme of all the styles by simply dragging a slider in a designer.

Months styled

RichCalendar allows you to display individual months in different styles, using the MonthRanges and MonthRangeStyle definitions. Every MonthRange consists of StartYear/StartMonth and EndYear/EndMonth definition. When the Year definition is left blank, the range is applied for all years. MonthRangeStyle definition allows to set month background (including backgroud image) and month header style and a day shape.

Individual dates styled

It is possible to set even the apperance of individual days using the DateItems and DateItemStyle definitions. Each day can contain multiple events defined as DateItem structure. DateItem definition consists mainly of date and text displayed in a tooltip. DateItem can have its style - either it can use one of styles defined in DateItemStyles collection (StyleName property then contains the name of predefined style) or it can have its own style defined (then UseLocalStyle property must be set to true). With Calendar.ShowDateItem property set to true the image or text abbreviation can be displayed directly in the day cell.

The date can contain multiple DateItems. When the items are of different appearance, styles are combined when possible, so for example a red border and a blue background can be displayed at a time.

Reccuring events and events lasting more than one day are not supported at this version and must be handled manually.

Data binding

DateItems collection can be filled using data binding. After specifying necessary DisplayMemberDate and DisplayMemberText members any DataTable or object collection can be bound to calendar. Dates are then populated with events from the data source. Data binding would not be complete without having the possibility to style the items - this can be done with setting the DisplayMemberImageIndex and the DisplayMemberStyle properties.

Date range

The range of displayable dates can be set through MinDate and MaxDate properties. The information about currently displayed range is always accessible in FirstVisibleDate and LastVisibleDate properties.
The initial setting of first displayed date can be done with ShowMode property. ShowMode.MinDate option shows the beginning of the date range, while ShowMode.MaxDate shows its end. ShowMode.Today sets actual month as a start month. Last option is ShowMode.DefaultDate which shows the month stored in DefaultDate property as a first visible month.

Navigation

Multiple navigation concepts are available. For vertical scrolling the ScrollBar or NavigationBar can be displayed on the right side of calendar. In the month headers, there can be standard arrows used or a dropdown button that opens a new component called MonthSelector. You achieve this through the NavigationMode and MonthHeaderNavigationMode properties. The MonthSelector has its own branch in calendar style definition.

Selection

Multiple day selection modes are available through the SelectionMode property. SingleDay mode makes the last clicked date selected. Continuous mode enables to select the date range. Random mode allows user to select multiple dates and ranges using Ctrl and Shift keys, same as during standard Windows selection. The maximum selected day count can be defined with a MaxSelectionCount property. Selection can also be disabled at all.

A style for selected days can be defined. It has a Transparency setting, so the original day appearance may be seen even if the date is selected.

Events

RichCalendar contains rich event model which enables you to handle a number of user actions. All calendar parts, including individual days, provide information about user mouse actions and clicks. You can also get information about selection changes, calendar navigation and resizing. The appearance of any day can be updated during data binding using the ItemBinding event.