Skip to content

Calendar Properties

Marvin E edited this page Dec 25, 2025 · 13 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 ChangeDateSelection method processes the selected date.

  • SelectionType.None: Nothing happens.
  • SelectionType.Single: The SelectionAction is performed on the date.
  • SelectionType.Range: Sets the calendar's RangeSelectionStart property to the date if it's null, otherwise sets the calendar's RangeSelectionEnd property if it isn't null, otherwise performs the SelectionAction on the dates between RangeSelectionStart and RangeSelectionEnd 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.

SelectionDirection

SelectionDirection Defines where the newly selected date must be in relation to the earliest and latest selected dates when changing the date selection via the ChangeDateSelection method. If it isn't in the correct place, nothing happens.

  • SelectionDirection.StartToEnd: The newly selected date must be later than or equal to the earliest selected date.
  • SelectionDirection.EndToStart: The newly selected date must be earlier than or equal to the latest selected date.
  • SelectionDirection.Confined: The newly selected date must be in between or equal to the earliest and latest selected date.
  • SelectionDirection.ConfinedReverse: The newly selected date must be outside or equal to the earliest selected date and latest selected date.

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.

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.

Events

Event Description
DateSelectionChanged This is raised when the SelectedDates collection is changed or modified.
It uses the DateSelectionChangedEventArgs class to provide 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.
DaysUpdating Raised at the start of the 'UpdateDays' method.
DaysUpdated Raised at the end of the 'UpdateDays' method.

Clone this wiki locally