Skip to content

Re-sync the heavily drifted FluentTheme styles with WinUI 2.5.1 #25120

Open

Description

@MartinZikmund

What would you like to be added? 💡

Re-sync the last five Uno.UI.FluentTheme dictionaries that still drift heavily from WinUI winui3/release/2.5.1 (src/controls/dev/CommonStyles/...). Each needs its Uno deltas fixed at the root, or moved to Resources/PriorityOverlay/UnoFluentOverlay.xaml, before the file can become a verbatim copy:

  • ListViewItem_themeresources.xaml and GridViewItem_themeresources.xaml (~170 / ~160 changed lines): WinUI's templates use ListViewItemPresenter, which Uno does not implement (Support for ListViewItemPresenter and GridViewItemPresenter #1444). Uno keeps an expanded ContentPresenter-based template.
  • CalendarView_themeresources.xaml (~740 changed lines): several "Uno only" anti-flicker tweaks (opacity defaults, visibility after opacity) plus an old copy of the resources. Overlaps with Align the CalendarView, CalendarDatePicker and DatePicker overlays with WinUI #25016.
  • CommandBar_themeresources.xaml (~130 changed lines): literal durations instead of {StaticResource ControlNormalAnimationDuration} / ControlFastAnimationDuration, because resolving a string resource into a KeyTime failed. There is also a ClipGeometryTransform.Y final-value workaround and extra IsHitTestVisible / IsTabStop / Content bindings.
  • ProgressBar_themeresources.xaml (~215 changed lines): old copy plus a duplicate-style exclusion.

Also covered by this issue: the MenuFlyoutPresenter and CommandBarFlyout backgrounds. WinUI draws them with a DesktopAcrylicBackdrop through SystemBackdrop over a transparent brush. Uno does not support a SystemBackdrop on popups yet (DesktopAcrylicBackdrop and Popup.SystemBackdrop are generated stubs), so UnoFluentOverlay.xaml keeps them on AcrylicInAppFillColorDefaultBrush. Implementing popup backdrops removes that override.

Finally, Priority01/Deprecated_themeresources.xaml has one line removed: WinUI's empty <Style TargetType="ProgressBar" />. Uno.XamlMerge.Task de-duplicates implicit styles by the raw TargetType string, so ProgressBar and controls:ProgressBar (from ProgressBar.xaml) both survive the merge, and the generator rejects the duplicate key. Normalizing the prefix in the merge task (MergedDictionary.GetKey) would let that file go back to verbatim.

Why is this needed? 🤔

These are WinUI parity gaps in the default styles. Once every FluentTheme dictionary is a verbatim WinUI copy, updating to a newer WinUI release becomes copy-paste.

Renderer 🎨

  • Skia
  • Native

For which platforms 📱💻🖥️

All platforms 🌍

Anything else we need to know? 💬

Follow-up from #21513, which made Generic.xaml and the other ~100 FluentTheme dictionaries verbatim WinUI 2.5.1 copies. To measure drift, normalize whitespace and namespace prefixes, then diff each file against winui3/release/2.5.1 in microsoft-ui-xaml.

Metadata

Metadata

Assignees

Labels

area/themingdifficulty/medium 🤔kind/enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions