Skip to content

[Icons] WinUI members left unported by the WinUI 2.7.0 sync #26677

Todo

Description

@MartinZikmund

What would you like to be added? 💡

The icon controls are now tracked by the WinUI Port Sync at WinUI 2.7.0 (build/winui-sync/areas/icons.json). The onboarding left these upstream members unported. The area's baseline has moved past them, so this issue is their record:

Upstream What is missing in Uno Why it was not ported
dxaml/xcp/core/core/elements/icon.cpp: IsFontIconNoGridOptimizationEnabled, IsBitmapIconNoGridOptimizationEnabled and the branches they guard in CFontIcon and CBitmapIcon (ApplyTemplate, OnPropertyChanged, CreateWritableBitmapFromSource, ApplyForegroundColorToImage, ReleaseWriteableBitmapResources) The opt-in IconNoGridOptimization change, which adds the TextBlock / Image straight under the icon instead of inside a transparent Grid Uno has no equivalent of WinUI's optional change state (OptionalChangeState, RuntimeCompatibilityOptions) to turn it on with. The default path (with the Grid) is ported and matches WinUI's default
icon.cpp: CIconElement::Create, CSymbolIcon::Create The core type converters that build a SymbolIcon from a symbol name Uno converts in the XAML generator and in BindingPropertyHelper.FastStringToIconElement instead
icon.cpp: CPathIcon::Create The core type converter that builds a PathIcon from path markup Not implemented in Uno

Each one is marked TODO Uno: NOT PORTED in src/Uno.UI/UI/Xaml/Controls/Icons (FontIcon.mux.cs, BitmapIcon.mux.cs, IconElement.mux.cs, PathIcon.mux.cs).

Why is this needed? 🤔

  • Apps that opt in to the no-Grid optimization on WinUI get a flatter icon tree; on Uno the tree always has the Grid. ImageIconTests.ImageIconTest carries a #if HAS_UNO branch for that reason.
  • PathIcon cannot be created from a path string the way WinUI's converter allows.

For which platforms 📱💻🖥️

All platforms 🌍

Anything else we need to know? 💬

Tracking issue for the onboarding: #26521.

Activity

  1. added
    kind/enhancement
    triage/untriaged
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/enhancementtriage/untriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions