# GraffitiProCalendar
Class Inherits GraffitiSuite.BaseCanvas
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| BackgroundEventCollisionBehaviors | Blend <br > Stack <br > Topmost | (None) |
| CalendarViews | Month <br > MonthList <br > WeekAgenda <br > WeekBasic <br > WeekList <br > DayAgenda <br > DayBasic <br > DayList <br > YearList | (None) |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| DateClicked | selectedDate As DateTime | (None) | Raised when a date is clicked. |
| DateDoubleClicked | selectedDate As DateTime | (None) | Raised when a date is double-clicked. |
| DateRangeSelected | startDateTime As DateTime <br> endDateTime As DateTime | (None) | Raised when the user selects a date or time range. |
| DateTimeConstructContextualMenu | base as DesktopMenuItem <br> slot as DateTime | (None) | (None) |
| DateTimeContextualMenuItemSelected | hitItem as DesktopMenuItem <br> slot as DateTime | (None) | (None) |
| EventConstructContextualMenu | base As DesktopMenuItem <br> calendarEvent As GraffitiProCalendarEvent | (None) | Raised before an event contextual menu is displayed. |
| EventContextualMenuItemSelected | hitItem As DesktopMenuItem <br> calendarEvent As GraffitiProCalendarEvent | (None) | Raised when an item from an event contextual menu is selected. |
| EventDoubleClicked | calendarEvent As GraffitiProCalendarEvent | (None) | Raised after a user double-clicks an event. |
| EventMoved | calendarEvent As GraffitiProCalendarEvent <br> proposedStartDateTime As DateTime <br> proposedEndDateTime As DateTime <br> ByRef applyToSeries As Boolean | Boolean | Raised when an event drag ends before the change is committed. Return True to cancel. |
| EventResized | calendarEvent As GraffitiProCalendarEvent <br> proposedStartDateTime As DateTime <br> proposedEndDateTime As DateTime <br> ByRef applyToSeries As Boolean | Boolean | Raised when an event resize ends before the change is committed. Return True to cancel. |
| EventSelected | calendarEvent As GraffitiProCalendarEvent | (None) | Raised when an event is selected. |
| SelectionChanged | (None) | (None) | (None) |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| AddEvent | calendarEvent As GraffitiProCalendarEvent | (None) | Adds a new event to the calendar. |
| AddEvents | ParamArray calendarEvents() As GraffitiProCalendarEvent | (None) | (None) |
| AddRestriction | calendarRestriction As GraffitiProCalendarRestriction | (None) | Adds a date restriction to the calendar. |
| AddViewButton | viewMode As CalendarViews | (None) | Adds a view mode button to the header. |
| AddViewButtonAt | index As Integer <br> viewMode As CalendarViews | (None) | Inserts a view mode button at the specified header index. |
| ClearSelectedDateRange | (None) | (None) | Clears the currently selected date or time range. |
| ClearSelectedEvents | (None) | (None) | (None) |
| Constructor | (None) | (None) | Creates a calendar with empty event and restriction collections. |
| CreateOccurrenceOverride | seriesEvent As GraffitiProCalendarEvent <br> occurrenceStartDateTime As DateTime | GraffitiProCalendarEvent | Creates a persisted override for a single occurrence in a recurring series. |
| DayTitleBackgroundColor | targetDate As DateTime | Color | Returns or assigns the background color for a date title in the Month view. |
| DayTitleBackgroundColor | targetDate As DateTime <br> Assigns value As Color | (None) | Returns or assigns the background color for a date title in the Month view. |
| DayTitleTextColor | targetDate As DateTime | Color | Returns or assigns the text color for a date title in the Month view. |
| DayTitleTextColor | targetDate As DateTime <br> Assigns value As Color | (None) | Returns or assigns the text color for a date title in the Month view. |
| DeselectEvent | calendarEvent As GraffitiProCalendarEvent | (None) | (None) |
| EventAt | index As Integer | GraffitiProCalendarEvent | Returns the event at the specified index. |
| EventAtPoint | position As Point | GraffitiProCalendarEvent | Returns the event rendered at the specified canvas position. |
| FromICS | data As String | (None) | Replaces the calendar's events with the VEVENT data in an iCalendar stream. |
| FromJSON | json as JSONItem <br> includeRestrictions as Boolean = True | (None) | Replaces the calendar data with a JSON representation. |
| IndexOfViewButton | viewMode As CalendarViews | Integer | Returns the header index of a view mode, or -1 when absent. |
| IsEventSelected | calendarEvent As GraffitiProCalendarEvent | Boolean | (None) |
| LastEventIndex | (None) | Integer | Returns the last valid event index. |
| LastRestrictionIndex | (None) | Integer | Returns the last valid restriction index. |
| LastSelectedEventIndex | (None) | Integer | (None) |
| LastViewButtonIndex | (None) | Integer | Returns the last valid header view button index. |
| MonthDayTitle | targetDate As DateTime | String | Returns or assigns the title shown for a date in the Month view. |
| MonthDayTitle | targetDate As DateTime <br> Assigns value As String | (None) | Returns or assigns the title shown for a date in the Month view. |
| NavigateNext | (None) | (None) | Moves the displayed period forward one view interval. |
| NavigatePrevious | (None) | (None) | Moves the displayed period backward one view interval. |
| Print | view As CalendarViews | (None) | (None) |
| RemoveAllEvents | (None) | (None) | Removes every event from the calendar. |
| RemoveAllRestrictions | (None) | (None) | Removes every restriction from the calendar. |
| RemoveAllViewButtons | (None) | (None) | Removes all view mode buttons from the header. |
| RemoveEvent | calendarEvent As GraffitiProCalendarEvent <br> removeAllInSeries As Boolean = False | (None) | Removes the specified event from the calendar. |
| RemoveEventAt | index As Integer <br> removeAllInSeries As Boolean = False | (None) | Removes the event at the specified index. |
| RemoveRestriction | calendarRestriction As GraffitiProCalendarRestriction | (None) | Removes the specified restriction from the calendar. |
| RemoveViewButton | viewMode As CalendarViews | (None) | Removes a view mode button from the header. |
| RemoveViewButtonAt | index As Integer | (None) | Removes the view mode button at the specified header index. |
| RestrictionAt | index As Integer | GraffitiProCalendarRestriction | Returns the restriction at the specified index. |
| ScrollTo | targetDate As DateTime | (None) | Scrolls the active view to the specified date. |
| ScrollTo | calendarEvent As GraffitiProCalendarEvent | (None) | Scrolls the active view to the start of the specified event. |
| SelectDateRange | startDateTime As DateTime <br> endDateTime As DateTime | (None) | Selects a date or time range. The end date and time is exclusive. |
| SelectedEventAt | index As Integer | GraffitiProCalendarEvent | (None) |
| SelectEvent | calendarEvent As GraffitiProCalendarEvent <br> append As Boolean = False | (None) | (None) |
| ToGraphics | g as Graphics <br> view as CalendarViews | (None) | (None) |
| ToICS | (None) | String | Exports calendar events as iCalendar. |
| ToJSON | (None) | JSONItem | Returns a JSON representation of the calendar data. |
| ViewButtonAt | index As Integer | CalendarViews | Returns the view mode for the specified header button index. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| BackgroundColor | ColorGroup | (None) | Overrides the default calendar background color. |
| BackgroundEventCollisionBehavior | BackgroundEventCollisionBehaviors | (None) | Controls how overlapping background events are rendered. |
| BorderColor | ColorGroup | (None) | Color applied to the outside edge of the control. |
| DayOfYearTextColor | ColorGroup | (None) | Text color for day-of-year numbers in the Month view. |
| DayOfYearVisible | Boolean | (None) | Controls whether day-of-year numbers replace day-of-month numbers in the Month view. |
| DisplayDate | DateTime | (None) | The date currently displayed within the calendar as the focal point. |
| DisplayDateMaximum | DateTime | (None) | Latest date that can be displayed. Nil removes the upper bound. |
| DisplayDateMinimum | DateTime | (None) | Earliest date that can be displayed. Nil removes the lower bound. |
| EventBackgroundColor | ColorGroup | (None) | Default background color for rendered events. |
| EventBorderColor | ColorGroup | (None) | Default border color for rendered events. |
| EventTextColor | ColorGroup | (None) | Default text color for rendered events. |
| FirstDayOfWeek | Integer | (None) | The day that begins displayed weeks. Values are 1 for Sunday through 7 for Saturday; set 0 to restore the locale default. |
| HasBorder | Boolean | (None) | Controls whether a border is drawn around the outside edge of the control. |
| HeaderBackgroundColor | ColorGroup | (None) | Background color for the calendar header. |
| HeaderHeight | Double | (None) | Height of the calendar navigation header. |
| HeaderTextColor | ColorGroup | (None) | Text color for the calendar header. |
| HeaderViewButtonBackgroundColor | ColorGroup | (None) | The background color for unselected header view buttons. |
| HeaderViewButtonTextColor | ColorGroup | (None) | The text color for unselected header view buttons. |
| HighContrastEnabled | Boolean | (None) | Forces a high-contrast color palette while preserving explicit color overrides. |
| MonthDayHeight | Double | (None) | Height of each day row in the month view. |
| MultipleEventSelectionEnabled | Boolean | (None) | Color used to draw the selected date or time range. |
| NavigationButtonsVisible | Boolean | (None) | Controls the visibility of the previous and next navigation buttons. |
| NextButtonBackgroundColor | ColorGroup | (None) | Background color for the next navigation button. |
| NextButtonCaption | String | (None) | Caption displayed in the next navigation button. |
| NextButtonTextColor | ColorGroup | (None) | Text color for the next navigation button. |
| NextButtonTooltip | String | (None) | Tooltip displayed for the next navigation button. |
| PopoverCloseButtonTooltip | String | (None) | Tooltip displayed for the overflow popover close button. |
| PreviousButtonBackgroundColor | ColorGroup | (None) | Background color for the previous navigation button. |
| PreviousButtonCaption | String | (None) | Caption displayed in the previous navigation button. |
| PreviousButtonTextColor | ColorGroup | (None) | Text color for the previous navigation button. |
| PreviousButtonTooltip | String | (None) | Tooltip displayed for the previous navigation button. |
| SelectedDateRangeColor | ColorGroup | (None) | Color used to draw the selected date or time range. |
| SelectedEvent | GraffitiProCalendarEvent | (None) | The event currently selected in the calendar. |
| SelectedEventBackgroundColor | ColorGroup | (None) | Background color for selected event representations. |
| SelectedEventBorderColor | ColorGroup | (None) | Border color for selected event representations. |
| SelectedEventTextColor | ColorGroup | (None) | Text color for selected event representations. |
| SelectedHeaderViewButtonBackgroundColor | ColorGroup | (None) | The background color for the selected header view button. |
| SelectedHeaderViewButtonTextColor | ColorGroup | (None) | The text color for the selected header view button. |
| SelectedRangeEnd | DateTime | (None) | Returns the selected range end date and time. |
| SelectedRangeStart | DateTime | (None) | Returns the selected range start date and time. |
| SlotBorderColor | ColorGroup | (None) | Border color for calendar grid slots. |
| TimeMarkerColor | ColorGroup | (None) | Color used to draw the current time marker in agenda views. |
| TimeMarkerVisible | Boolean | (None) | Controls whether the current time marker is drawn in agenda views. |
| TimeSlotHeight | Double | (None) | Height of each hour slot in agenda views. |
| TodayButtonBackgroundColor | ColorGroup | (None) | Background color for the Today button. |
| TodayButtonCaption | String | (None) | Caption displayed in the Today button. |
| TodayButtonTextColor | ColorGroup | (None) | Text color for the Today button. |
| TodayButtonTooltip | String | (None) | Tooltip displayed for the Today button. |
| TodayButtonVisible | Boolean | (None) | Shows a Today button in the right side of the header which will scroll the Calendar back to the current day and time. |
| ViewButtonDayAgendaCaption | String | (None) | (None) |
| ViewButtonDayAgendaTooltip | String | (None) | Tooltip displayed for the Day Agenda view button. |
| ViewButtonDayBasicCaption | String | (None) | (None) |
| ViewButtonDayBasicTooltip | String | (None) | Tooltip displayed for the Day Basic view button. |
| ViewButtonDayListCaption | String | (None) | (None) |
| ViewButtonDayListTooltip | String | (None) | Tooltip displayed for the Day List view button. |
| ViewButtonMonthCaption | String | (None) | (None) |
| ViewButtonMonthListCaption | String | (None) | (None) |
| ViewButtonMonthListTooltip | String | (None) | Tooltip displayed for the Month List view button. |
| ViewButtonMonthTooltip | String | (None) | Tooltip displayed for the Month view button. |
| ViewButtonWeekAgendaCaption | String | (None) | (None) |
| ViewButtonWeekAgendaTooltip | String | (None) | Tooltip displayed for the Week Agenda view button. |
| ViewButtonWeekBasicCaption | String | (None) | (None) |
| ViewButtonWeekBasicTooltip | String | (None) | Tooltip displayed for the Week Basic view button. |
| ViewButtonWeekListCaption | String | (None) | (None) |
| ViewButtonWeekListTooltip | String | (None) | Tooltip displayed for the Week List view button. |
| ViewButtonYearListCaption | String | (None) | (None) |
| ViewButtonYearListTooltip | String | (None) | Tooltip displayed for the Year List view button. |
| ViewMode | CalendarViews | (None) | The current calendar view mode. |
| WeekNumberHeaderCaption | String | (None) | Caption shown above the week number column in the Month view. |
| WeekNumberTextColor | ColorGroup | (None) | Text color for week numbers in the Month view. |
| WeekNumberVisible | Boolean | (None) | Controls whether ISO week numbers are shown in the Month view. |