You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Icons] WinUI members left unported by the WinUI 2.7.0 sync #26677
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
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.
Activity