Calendar
Overview
Section titled “Overview”The web Navius primitives library has no Calendar family of its own: on the web side the calendar
surface is ZitsCalendar, a styled-layer component outside the primitives repo, referenced only by
delegation from the date-range-picker family. The contract source for this document is therefore
the date-range-picker family composition (including the data-range-start/data-range-end/
data-range-middle styling contract implied by the web tests/e2e/specs/dates.spec.ts) plus the
native WPF Calendar this control derives from. NaviusCalendar is Tier A: it derives
System.Windows.Controls.Calendar directly, inheriting the native keyboard model and
CalendarAutomationPeer for free, and adds only a token-driven default template. Both
NaviusDatePicker and NaviusDateRangePicker template a NaviusCalendar as their calendar
surface.
xmlns:calendar="clr-namespace:Navius.Wpf.Primitives.Controls.Calendar;assembly=Navius.Wpf.Primitives"
<calendar:NaviusCalendar x:Name="SingleDate" />
<calendar:NaviusCalendar x:Name="Range" SelectionMode="SingleRange" />Properties
Section titled “Properties”NaviusCalendar declares no dependency properties of its own; the public surface is the native
Calendar’s. Native properties this codebase actively sets:
| Property | Type | Default | From | Description |
|---|---|---|---|---|
SelectionMode |
CalendarSelectionMode |
SingleDate |
System.Windows.Controls.Calendar |
NaviusDatePicker.OnOpened leaves this at the native default; NaviusDateRangePicker.OnOpened switches its instance to SingleRange while open, purely so both endpoints and the days between render as selected. Display-only: commits never go through SingleRange’s native Shift-to-extend semantics. |
SelectedDate |
DateTime? |
null |
System.Windows.Controls.Calendar |
Written by the pickers to seed and repaint selection. Read as a commit input only in one place: on an Enter/Space pick, the shared picker base reads SelectedDate after the native class handler has already moved it to the focused day. |
SelectedDates |
SelectedDatesCollection |
empty | System.Windows.Controls.Calendar |
Repainted by NaviusDateRangePicker after a commit so start/end/middle days all render as selected. |
DisplayDate |
DateTime |
DateTime.Today |
System.Windows.Controls.Calendar |
Seeded by the pickers on open to the current value, or DateTime.Today when nothing is selected. |
The theme style (Navius.Calendar.Style, in Themes/Calendar.xaml) wires CalendarDayButtonStyle,
CalendarButtonStyle, and CalendarItemStyle to the keyed part styles it ships; these are template
infrastructure, not properties a consumer sets per instance.
Events
Section titled “Events”No events are added. The native SelectedDatesChanged event still exists and can be handled, but
neither picker uses it as a commit source: the native calendar moves its selection on every arrow
key, and the picker contract wants arrow keys to navigate without committing.
Keyboard interactions
Section titled “Keyboard interactions”Inherited entirely from the native control; NaviusCalendar adds no key handling of its own.
| Key | Behavior |
|---|---|
| Arrow keys | Move focus by one day. |
PageUp / PageDown |
Page by month. |
Home / End |
Move focus within the grid. The exact target is unverified: this repo’s own sources are not consistent about it (the Gallery page’s intro text describes “the week’s edges” while the control’s own doc comment leaves it unqualified), and no test in this repo independently drives Home/End to confirm either wording. |
Enter / Space |
Selects the focused day. At the picker layer this is what the shared NaviusDatePickerBase reads as a commit (see date-picker.md). |
| Header button | Zooms out to the year, then decade view. |
No test in this repo independently drives arrow-key day navigation or PageUp/PageDown month
paging either; the in-grid navigation model is asserted only as inherited native Calendar
behavior.
UIA mechanism
Section titled “UIA mechanism”NaviusCalendar ships no custom automation peer; it inherits the native CalendarAutomationPeer,
which reports AutomationControlType.Calendar. CalendarTests.AutomationPeer_IsTheNativeCalendarPeer
asserts the peer exists and reports that control type. Everything else in the peer tree (cell peers,
selection patterns) is the native, Microsoft-owned peer tree; this repo neither modifies nor
independently verifies it.
Web deltas
Section titled “Web deltas”- No web Calendar family exists to compare against directly: the web contract is the
date-range-picker composition’s
ZitsCalendarreference, which has no source inNavius.Primitivesto port at all. This control was designed from the native WPFCalendarplus thedata-range-start/data-range-end/data-range-middlestyling contract implied by the web e2e spec, not ported line for line. - The three part styles (
Navius.Calendar.DayButtonStyle,MonthButtonStyle,ItemStyle) are keyed, not implicit, becauseNaviusAnchoredPopupreparents picker popup content into aSystem.Windows.Controls.Primitives.Popup, where ambient implicit-style lookup is unreliable; they ride the native Calendar’s ownCalendarDayButtonStyle/CalendarButtonStyle/CalendarItemStyleproperties instead, set byNavius.Calendar.Style. - Known residual: the
Home/Endkeyboard target is unconfirmed (see “Keyboard interactions” above); treat the current wording as unverified until a test drives it. - Known residual: no dedicated end-to-end coverage exists for this control; verification is unit-suite plus the native peer assertion only.
Captures
Section titled “Captures”The Calendar Gallery page rendered at the pinned commit, in each theme.


