Skip to content

CalendarView: Theme resources and Fluent Design token migration #22969

@MartinZikmund

Description

@MartinZikmund

Phase 1 of CalendarView WinUI 3 parity upgrade

Parent tracking issue: (will be linked from epic)

Scope

Update CalendarView_themeresources.xaml from legacy SystemControl* brushes to modern Fluent Design tokens. Add all missing resource keys. Add the CalendarViewBaseItemRoundedChromeEnabled boolean resource flag.

Missing resources to add

Today variants:

  • CalendarViewTodayBackground, CalendarViewTodayHoverBackground, CalendarViewTodayPressedBackground, CalendarViewTodayDisabledBackground
  • CalendarViewTodayBlackoutBackground, CalendarViewTodayBlackoutForeground
  • CalendarViewTodaySelectedInnerBorderBrush

Blackout:

  • CalendarViewBlackoutBackground, CalendarViewBlackoutStrikethroughForeground

Interaction states:

  • CalendarViewSelectedHoverForeground, CalendarViewSelectedPressedForeground, CalendarViewSelectedDisabledForeground, CalendarViewSelectedDisabledBorderBrush
  • CalendarViewOutOfScopeHoverForeground, CalendarViewOutOfScopePressedForeground
  • CalendarViewCalendarItemHoverBackground, CalendarViewCalendarItemPressedBackground, CalendarViewCalendarItemDisabledBackground, CalendarViewCalendarItemBorderBrush

Navigation:

  • CalendarViewNavigationButtonBackgroundPointerOver, CalendarViewNavigationButtonBackgroundPressed
  • CalendarViewHeaderNavigationButtonForeground* variants

Layout metrics:

  • CalendarViewDayItemFontSize, CalendarViewMonthYearItemFontSize
  • CalendarViewDayItemMargin, CalendarViewWeekDayMargin, CalendarViewWeekDayPadding, CalendarViewMonthYearItemMargin
  • CalendarViewFirstOfMonthLabelFontSize, CalendarViewFirstOfYearDecadeLabelFontSize

Font weights:

  • CalendarViewHeaderNavigationFontWeight, CalendarViewWeekDayFontWeight, CalendarViewTodayFontWeight

Feature flag:

  • CalendarViewBaseItemRoundedChromeEnabled (Boolean, default false initially)

Files to modify

  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarView_themeresources.xaml
  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarView.h.cs (add new internal brush/property members)
  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarView_Partial.cs (constructor brush initialization)

WinUI source reference

  • controls/dev/CommonStyles/CalendarView_themeresources.xaml
  • dxaml/xcp/core/core/elements/CalendarView.cpp (theme resource setup)

Dependencies

None (first phase)

Risk & Testing

  • Risk: LOW - purely additive, existing keys unchanged
  • Size: Medium PR (~200-300 lines XAML, ~50 lines C#)
  • Testing: Visual regression via SamplesApp CalendarView_Theming sample; verify identical rendering before/after

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions