Skip to content

Navigation

Marvin E edited this page Jan 6, 2023 · 29 revisions

Calendar

Navigation using the NavigateCalendar method

Navigation can be performed using the NavigateCalendar method. It takes a parameter specifying how many time units to navigate by.

For example:

  • NavigationTimeUnit.Day + a navigation amount of 15 will move the calendar 15 days forward.
  • NavigationTimeUnit.Day + a navigation amount of -15 will move the calendar 15 days backward.
  • NavigationTimeUnit.Month + a navigation amount of 3 will move the calendar 3 months forward.
  • NavigationTimeUnit.Year + a navigation amount of -8 will move the calendar 8 years backward.

Time Unit

The time unit the NavigateCalendar method uses can be changed by setting the NavigationTimeUnit property of the Calendar.

Limiting

Navigation can be limited to a specific range of dates by changing the NavigationLowerBound and `NavigationUpperBound properties of the Calendar.

Looping

You can specify the behaviour of the CalendarView when trying to navigate outside the bounds defined by NavigationLowerBound and NavigationUpperBound by changing the NavigationLoopMode property.

Navigation using the NavigatedDate property

Navigation can also be performed by setting the NavigatedDate property of the Calendar.

CalendarView

The CalendarView does not have navigation built into it by default. Instead, it exposes the BackwardsArrowCommand, BackwardsArrowCommandParameter, ForwardsArrowCommand, and ForwardsArrowCommandParameter which can be used to implement this functionality.

The CalendarView displays its navigation bar using a NavigationView. Its appearance can be changed using the NavigationViewTemplate property of the CalendarView.