Skip to content

Calendar Properties

Marvin E edited this page Apr 18, 2024 · 9 revisions

Properties

Property Type Description

NavigatedDate

DateTime The date the Calendar is currently navigated to.

TodayDate

DateTime The date the Calendar will treat as 'Today'.

NavigationLowerBound

DateTime The inclusive lower bound of the range of dates the NavigatedDate can be set to.

NavigationUpperBound

DateTime The inclusive upper bound of the range of dates the NavigatedDate can be set to.

NavigationLoopMode

NavigationLoopMode The behaviour of the calendar when navigating outside the allowed range.
NavigationLoopMode.DontLoop Don't loop.
NavigationLoopMode.LoopMinimum Loop to the upper bound when navigating past the lower bound.
NavigationLoopMode.LoopMaximum Loop to the lower bound when navigating past the upper bound.
NavigationLoopMode.LoopMiniumAndMaximum Loop as defined in both LoopMinimum and LoopMaximum.

SelectionType

SelectionType Defines how the user is able to select dates.

SelectionType.None Tapping on a date does nothing.
SelectionType.Single The user can tap on a date to perform selection on.
SelectionType.Range The user can specify a range of dates to perform selection on. The user can tap on a date to specify the start of the range (The user can tap on the start date again to remove it), then tap on another date to specify the end of the range which then triggers selection for all the dates in the range inclusive.

SelectionAction

SelectionAction Defines what happens when a date is selected via the ChangeDateSelection or CommitRangeSelection methods.

SelectionAction.Add The dates will be added to the selection if not already present.
SelectionAction.Remove The dates will be removed from the selection if present.
SelectionAction.Modify Performs both SelectionAction.Add and SelectionAction.Remove on the selection.
SelectionAction.Replace Will replace the current selection with the dates if they are not the same.

RangeSelectionStart

DateTime? The start of the range of dates to perform selection on inclusive.

If RangeSelectionStart and RangeSelectionEnd are not null, CommitRangeSelection will be called and their values will be set back to null.

RangeSelectionEnd

DateTime? The end of the range of dates to perform selection on inclusive.

If RangeSelectionStart and RangeSelectionEnd are not null, CommitRangeSelection will be called and their values will be set back to null.

DateSelectionChanged

Event<DateSelectionChangedEventArgs> The event raised when SelectedDates is changed or modified. The DateSelectionChangedEventArgs expose the PreviousSelection and CurrentSelection properties.

Note: DateSelectionChanged will still be called if the collection contains the same elements but in a different order. Having duplicates may also cause unexpected behaviour.

Rows

int The number of rows to display. Each row represents one week.

AutoRows

bool Whether the calendar should automatically determine the minimum number of Rowsneeded to display the month or not.

AutoRowsIsConsistent

bool Determines if the AutoRows property should display the same number of rows throughout each month in the year.

StartOfWeek

DayOfWeek The day of the week that will be considered as the start of the week.

DayNamesOrder

ObservableRangeCollection<DayOfWeek> The order that the days of the week are currently displayed in. If CustomDayNamesOrder is not null, this value is set to it.
CustomDayNamesOrder ObservableRangeCollection<DayOfWeek> When this value is not null, DayNamesOrder is set to this.

PageStartMode

PageStartMode How the calendar will use the NavigatedDate to generate the first date in the page (and therefore the subsequent sequence of dates).

PageStartMode.FirstDayOfWeek Use the first date in NavigatedDate's Week.
PageStartMode.FirstDayOfMonth Use the first date in the first week of NavigatedDate's Month.
PageStartMode.FirstDayOfYear Use the first date in the first week of NavigatedDate's Year.

Days

ObservableRangeCollection<T> The days currently being displayed by the calendar.

Note: Displayed days != displayed dates.
For example if DayNamesOrder is "Monday, Monday, Monday Tuesday" and the row is displaying the week of 10th January 2022 - 16th January 2022, there would be 4 days displayed but only 2 dates displayed: 10th January 2022 and 11th January 2022.

Days

ObservableRangeCollection<TEvent> where TEvent : IEvent The events/appointments of the calendar.

The default class and interface for events have 4 properties:
- Title (string)
- Description (string)
- Start Date (DateTime)
- EndDate(DateTime?).

The event will be passed to any ICalendarDay's Events property when their DateTime falls between the StartDate and EndDate. If EndDate is null, any day after the StartDate will have that event.