PocketPlanner Programmer's Guide

Calendar Members

Constructors Properties Methods Events

The Calendar control serves as a view in document-view architecture, where the document is implemented by the Schedule class. The Calendar provides several schedule related views, such as SingleMonth, List, Timetable, that present the scheduled events in different styles and layouts.

The following tables list the members exposed by the Calendar type.

 Public Constructors

  Name Description

Calendar

Overloaded. Initializes a new instance of the Calendar class.

 Public Properties

  Name Description

AllowAutoScroll

Gets or sets a value indicating whether the control scrolls automatically its contents when users drag items near the edge of the client rectangle.

AllowInplaceCreate

Gets or sets a value indicating whether users are allowed to create items interactively.

AllowInplaceEdit

Gets or sets a value indicating whether users are allowed to edit items interactively.

ButtonOffset

Gets or set the offset of the buttons, displayed in the MonthRange and SingleMonth views' headers.

ButtonSize

Gets or sets the size of the navigation buttons, displayed in the views' headers.

ColorKey

Gets or sets the color key to use when drawing images.

ContactNameFormat

Gets or sets how to format and display contact names in the timetable header.

Contacts

Gets the contacts whose schedule to display when GroupType is set to GroupByContacts.

Culture

Gets or sets the CultureInfo object used to format and display time information in the calendar.

CurrentTime

Gets or sets the current time. When this property is set to DateTime.MinValue, the actual system time is returned.

CurrentView

Gets or sets the type of the calendar view.

CustomDraw

Gets or sets which UI elements of the calendar should be custom drawn.

DataSource

Gets or sets the data source associated with the control.

Date

Gets or sets the date currently displayed in the calendar.

DateTimeFormat

Gets or sets the DateTimeFormatInfo object that specifies how to format and display all dates within the calendar.

DayOfWeekStyles

Gets a collection of DayOfWeekStyle objects that allow customizing the appearance of specific days of the week in the calendar.

DayStyles

Gets a collection of DateStyle objects that allow customizing the appearance of specific days in the calendar.

DelayInplaceEdit

Gets or sets a value indicating whether the in-place editing of an item is delayed for a second when the item is clicked.

DragItemsOnDisabledAreas

Gets or sets a value indicating whether to update the position of items dragged over areas which do not allow items.

EnableDragCreate

Gets or sets a value indicating whether items are created merely by dragging in the control.

EnableKeyboard

Gets or sets a value indicating whether the selection can be manipulated through the keyboard.

EnableOptimization

Gets or sets a value indicating whether the control should try to optimize item rendering.

EndDate

Gets or sets the last date displayed in the calendar.

EnsureVisibleSelection

Gets or sets a value indicating whether the selected cells should be automatically brought into view.

FirstWeekendDay

Gets or sets the first weekend day in the calendar.

GroupType

Gets or sets the grouping criteria for the Timetable, WeekRange, List and Resource views.

HScrollerSmallChange

Gets or sets the small step for the horizontal scroll bar.

HScrollerVisible

Gets or sets a value indicating whether the horizontal scroller should always be visible, always hidden or visible only when it is needed.

HScrollPos

Gets or sets the current horizontal scroll position.

ImageList

Gets or sets the image list associated with the calendar.

InteractiveItemType

Gets or sets the type of an Item derived class whose instance should be created when a user starts typing while the calendar control has the keyboard focus.

ItemModificationStyle

Gets or sets a value indicating the way items are processed when modified interactively.

ItemScroll

Gets or sets the current scroll position in a List view whose EnableVirtualItemSpace property is set to Enabled.

ItemSelection

Gets a list of all selected items.

ItemSettings

Gets the ItemSettings object used to customize the visualization of schedule items in all calendar views.

ListViewSettings

Gets the ListViewSettings object used to customize the visualization of the List view.

Locations

Gets the locations whose schedule to display in the timetable when GroupType is set to GroupByLocations.

MinItemLength

Gets or sets the minimal length of interactively created items, expressed in minutes.

MonthRangeSettings

Gets the MonthRangeSettings object used to customize the visualization of a month range in the MonthRange view.

MonthSettings

Gets the MonthSettings object used to customize the visualization of months in the MonthRange and SingleMonth views.

MonthStyles

Gets a collection of DateStyle objects that allow customizing the appearance of specific months in the calendar.

Resources

Gets the resources whose schedule to display in the control when GroupType is set to GroupByResources.

ResourceViewSettings

Gets the ResourceViewSettings object used to customize the visualization of a Resource view.

Schedule

Gets or sets the schedule whose information should be displayed inside the calendar control.

ScrollPosition

Gets or sets the current scroll position.

Selection

Gets a Selection object representing the current selection in the calendar.

StartEditAfterModify

Gets or sets a value indicating whether in-place editing of items should automatically start after they are modified interactively.

Tasks

Gets the tasks whose schedule to display in the control when GroupType is set to GroupByTasks.

Theme

Gets or sets the theme applied to the calendar control UI elements.

TimetableSettings

Gets the TimetableSettings object used to customize the visualization of days and hours in Timetable view.

ToolTip

Gets the underlying ToolTip component.

VScrollerSmallChange

Gets or sets the small step for the vertical scroll bar.

VScrollerVisible

Gets or sets a value indicating whether the vertical scroller should always be visible, always hidden or visible only when it is needed.

VScrollPos

Gets or sets the current vertical scroll position.

WeekRangeSettings

Gets the WeekRangeSettings object used to customize the visualization of weeks in a WeekRange view.

 Public Methods

  Name Description

ApplyTheme

Overloaded. Applies a Theme to the calendar.

BeginInit

Implements the ISupportInitialize.BeginInit method. Call this method before making several consecutive changes to the control to suppress internal updates, but don't forget to invoke EndInit at the end.

CollapseResourceRow

Collapses the row associated with the specified Contact, Location, Task or Resource in a Resource view. If there is no such row or the current view is not ResourceView, nothing happens.

CompactItemLanes

Reassigns new lane indices to schedule items in a List view whose FreeDrag property is enabled in order to remove empty spaces between items. The relative order of the items remains untouched.

EndInit

Implements the ISupportInitialize.EndInit method. Call this method to signal that object initialization started with BeginInit is complete.

EnsureVisible

Overloaded. Ensures that the specified date or item is visible within the control, scrolling the contents of the control if necessary.

ExpandResourceRow

Expands the row associated with the specified Contact, Location, Task or Resource in a Resource view. If there is no such row or the current view is not ResourceView, nothing happens.

GetContactAt

Overloaded. Gets the Contact object whose schedule is displayed at the specified coordinates. This method can be only be used in views that support grouping.

GetDateAt

Overloaded. Returns the date of the calendar cell located at the specified coordinates.

GetElementBounds

Gets the bounding rectangle of a particular calendar element.

GetExactDateAt

Overloaded. Returns the date located at a specified position.

GetFirstDate

Gets the first date of the time range displayed in the calendar.

GetFirstVisibleDate

Determines which is the first visible date in the current view.

GetItemAt

Overloaded. Gets the scheduled Item object displayed at the specified coordinates.

GetItemBounds

Retrieves the bounding rectangle of the specified item.

GetItemListLane

Gets the index of the lane of the specified item within a List view whose FreeDrag property is enabled.

GetLastDate

Gets the last date of the time range displayed in the calendar.

GetLastVisibleDate

Determines which is the last visible date in the current view.

GetListLaneAt

Retrieves the index of the List view lane at the specified point, expressed in client coordinates.

GetLocationAt

Overloaded. Gets the Location object whose schedule is displayed at the specified coordinates. This method can be only be used in views that support grouping.

GetResourceAt

Overloaded. Gets the Resource object whose schedule is displayed at the specified coordinates. This method can be only be used in views that support grouping.

GetTaskAt

Overloaded. Gets the Task object whose schedule is displayed at the specified coordinates. This method can be only be used in views that support grouping.

GetVisibleItems

Retrieves a collection with all currently visible items.

IsResourceRowExpanded

Checks whether the row associated with the specified Contact, Location, Task or Resource in a Resource view is expanded.

LoadFrom

 

LoadFromDataSource

Loads the schedule from the underlying data source.

LoadViewSettings

Loads the view settings from the specified stream or XML document.

ResetDrag

If there is a mouse drag operation in progress, it is canceled.

ResetItemViewState

Resets the view-related item data contained in the underlying schedule. For example, items moved around in a list view with enabled FreeDrag property have their relative positions within the view reset.

ResumeDrag

Resumes the previously paused mouse drag operation.

SaveTo

 

SaveViewSettings

Saves the view settings to the specified stream or XML document.

SetItemListLane

Sets the lane index for the specified item within a List view whose FreeDrag property is enabled.

StartInplaceEdit

Starts in-place editing mode for the specified item to let users edit the item's text.

SuspendDrag

Temporarily pauses the current mouse drag operation.

UpdateLayout

Updates the position of the calendar's child controls such as buttons and scrollbars.

 Protected Methods

  Name Description

Dispose

Cleans up any resources being used.

OnContinuePrinting

Raises the ContinuePrinting event.

OnDateClick

Raises the DateClick event.

OnDraw

Raises the Draw event.

OnHiddenItemClick

Raises the HiddenItemClick event.

OnHScroll

 

OnItemClick

Raises the ItemClick event.

OnItemCloned

Raises the ItemCloned event.

OnItemCloning

Raises the ItemCloning event.

OnItemCreated

Raises the ItemCreated event.

OnItemCreating

Raises the ItemCreating event.

OnItemDeleted

Raises the ItemDeleted event.

OnItemDeleting

Raises the ItemDeleting event.

OnItemDeselecting

Raises the ItemDeselecting event.

OnItemInplaceEdited

Raises the ItemInplaceEdited event.

OnItemInplaceEditEnding

Raises the ItemInplaceEditEnding event.

OnItemInplaceEditStarting

Raises the ItemInplaceEditStarting event.

OnItemListLaneChanged

Raises the ItemListLaneChanged event.

OnItemModificationCanceled

Raises the ItemModificationCanceled event.

OnItemModified

Raises the ItemModified event.

OnItemModifying

Raises the ItemModifying event.

OnItemSelecting

Raises the ItemSelecting event.

OnItemSelectionChanged

Raises the ItemSelectionChanged event.

OnItemTooltipDisplaying

Raises the ItemTooltipDisplaying event.

OnKeyPress

Control.OnKeyPress override.

OnListViewHeaderClick

Raises the ListViewHeaderClick event.

OnLostFocus

Control.OnLostFocus override.

OnMonthHeaderClick

Raises the MonthHeaderClick event.

OnMonthRangeHeaderClick

Raises the MonthRangeHeaderClick event.

OnMonthWeekHeaderClick

Raises the MonthWeekHeaderClick event.

OnMouseDown

Control.OnMouseDown override.

OnMouseMove

Control.OnMouseMove override.

OnMouseUp

Control.OnMouseUp override.

OnPaint

Control.OnPaint override.

OnPaintBackground

Control.OnPaintBackground override.

OnRecurringItemDeleting

Raises the RecurringItemDeleting event.

OnResize

Control.OnResize override.

OnResourceViewBottomTimelineClick

Raises the ResourceViewBottomTimelineClick event.

OnResourceViewMiddleTimelineClick

Raises the ResourceViewMiddleTimelineClick event.

OnResourceViewRowHeaderClick

Raises the ResourceViewRowHeaderClick event.

OnResourceViewTopTimelineClick

Raises the ResourceViewTopTimelineClick event.

OnScroll

Raises the Scroll event.

OnTimetableColumnHeaderClick

Raises the TimetableColumnHeaderClick event.

OnVisibleDateChanged

Raises the VisibleDateChanged event.

OnVScroll

 

OnWeekRangeHeaderClick

Raises the WeekRangeHeaderClick event.

 Public Events

  Name Description

ContinuePrinting

Occurs at the end of a printing operation to enable users to continue printing the calendar with different view settings.

DateClick

Raised when the user clicks a date cell in the calendar.

Draw

Raised to allow custom drawing of calendar UI elements.

HiddenItemClick

Raised when a hidden items cue icon is clicked.

HScroll

Raised when the control has been scrolled horizontally.

ItemClick

Raised when the user clicks a schedule item.

ItemCreated

Raised when a schedule item is created by the user.

ItemCreating

Raised when the user is about to create a new schedule item.

ItemDeleted

Raised when the user deletes a schedule item.

ItemDeleting

Raised when the user is about to delete a schedule item.

ItemDeselecting

Raised when an item is about to be deselected.

ItemInplaceEdited

Raised when item's text is in-place edited.

ItemInplaceEditEnding

Raised when in-place editing of item's text is about to be accepted.

ItemInplaceEditStarting

Raised when in-place editing of item's text is about to begin.

ItemListLaneChanged

Raised when the lane index of an item within a List view has changed.

ItemModificationCanceled

Raised when an item modification is canceled by the user.

ItemModified

Raised when a schedule item is moved or resized by the user.

ItemModifying

Raised when the user moves or resizes a schedule item, which would change the item's scheduled start or end date and time.

ItemSelecting

Raised when an item is about to be selected.

ItemSelectionChanged

Raised when an item is selected or deselected.

ListViewHeaderClick

Raised when the header of a List view is clicked.

MonthHeaderClick

Raised when the header of a Month view is clicked.

MonthRangeHeaderClick

Raised when the header of an MonthRange view is clicked.

MonthWeekHeaderClick

Raised when a cell in the week header of a Month view is clicked.

RecurringItemDeleting

Raised when the user is about to delete a recurring item.

ResourceViewBottomTimelineClick

Raised when the bottom timeline of a Resource view is clicked.

ResourceViewMiddleTimelineClick

Raised when the middle timeline of a Resource view is clicked.

ResourceViewRowHeaderClick

Raised when the header of a Resource view row is clicked.

ResourceViewTopTimelineClick

Raised when the top timeline of a Resource view is clicked.

Scroll

Raised when the value of a scrollbar has changed.

TimetableColumnHeaderClick

Raised when the header of a Timetable column is clicked.

VisibleDateChanged

Raised when the user selects another date using the month or year navigation controls on the calendar header area.

VScroll

Raised when the control has been scrolled vertically.

WeekRangeHeaderClick

Raised when the header of a WeekRange view is clicked.

 See Also