Repository navigation
Conversation
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23744/wasm-skia-net9/index.html |
|
The build 222094 found UI Test snapshots differences: Details
|
019f395 to
5b61cf9
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23744/wasm-skia-net9/index.html |
|
The build 222663 found UI Test snapshots differences: Details
|
5b61cf9 to
a5d02b6
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23744/wasm-skia-net9/index.html |
a5d02b6 to
02d8ef9
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23744/wasm-skia-net9/index.html |
|
The build 223668 found UI Test snapshots differences: Details
|
|
|
02d8ef9 to
aa1d623
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23744/wasm-skia-net9/index.html |
|
The build 224358 found UI Test snapshots differences: Details
|
|
|
aa1d623 to
4de8e8d
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23744/wasm-skia-net9/index.html |
|
The build 224474 found UI Test snapshots differences: Details
|
4de8e8d to
559bd86
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23744/wasm-skia-net9/index.html |
|
The build 224749 found UI Test snapshots differences: Details
|
FrameworkElement and ContentControl implemented System.Collections.
IEnumerable, a Uno-only divergence WinUI does not have. On FrameworkElement
it paired with public Add(UIElement) helpers on Border/Panel/ScrollViewer to
enable C#-markup collection-initializer syntax (new Panel { child }). WinUI
has neither.
Remove the whole surface for parity:
- FrameworkElement: drop : IEnumerable and GetEnumerator (crossruntime/skia/
reference).
- ContentControl: drop the redundant : IEnumerable re-declaration (it
inherited FrameworkElement's GetEnumerator).
- Border/Panel/ScrollViewer: remove the now-orphaned public Add(UIElement).
Migrate initializers to the explicit property: Children = { } for panels,
Child = for Border, Content = for ScrollViewer (14 sites in RuntimeTests).
PackageDiffIgnore (6.5) gets entries for the removed GetEnumerator and Add.
BC65 of the 7.0 breaking-changes rollup (#8339).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
559bd86 to
d682151
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23744/wasm-skia-net9/index.html |
|
The build 224858 found UI Test snapshots differences: Details
|
|
|
…uide #23744 (BC65) removed the Uno-only IEnumerable implementation from FrameworkElement and ContentControl, and the Add helpers on Border, Panel and ScrollViewer, so C# collection initializers on those types no longer compile. Add a section with the replacements and extend the matching checklist step. Fixes #25329
GitHub Issue: #8339
PR Type:
💬 Other... Breaking change (API alignment with WinUI)
What changed? 🚀
FrameworkElementandContentControlimplementedSystem.Collections.IEnumerablein Uno — a Uno-only divergence WinUI does not have. OnFrameworkElementit was paired with publicAdd(...)methods onBorder,Panel, andScrollViewerto enable C#-markup collection-initializer syntax (new StackPanel { child1, child2 },new Border { child }). WinUI has neither the interface nor thoseAddmethods.This PR (BC65 of the Phase 5 breaking-changes wave) removes the whole Uno-only surface for WinUI parity (ground rule #2 — remove divergences, don't preserve intermediate Uno-only shapes):
FrameworkElement— dropped: IEnumerable(FrameworkElement.crossruntime.cs,.skia.cs,.reference.cs) and the publicIEnumerator GetEnumerator()(.skia.cs,.reference.cs).ContentControl— dropped the redundant: IEnumerablere-declaration (it had no ownGetEnumerator; it inherited FrameworkElement's).Border/Panel/ScrollViewer— removed the now-orphaned publicAdd(UIElement)collection-initializer helpers (they only had meaning together with theIEnumerable).Migration
Collection-initializer child syntax moves to the explicit content/children property:
new StackPanel { a, b }new StackPanel { Children = { a, b } }new Border { child }new Border { Child = child }new ScrollViewer { content }new ScrollViewer { Content = content }All 14 in-repo call sites (in
Uno.UI.RuntimeTests) were migrated accordingly.foreach/LINQ over aFrameworkElement's visual children (which theIEnumerablealso allowed) should useVisualTreeHelperor the control's own children collection instead.Validation:
SamplesApp.Skia.Generic(net10.0) builds clean, transitively compilingUno.UI,Uno.UI.RuntimeTests, and all samples — 0 warnings / 0 errors. SamplesApp had no bare-collection-init usages. Framework build surfaced no direct.Add()callers..Android.cs/.iOS.cs/.UIKit.cs/.wasm.cs/.reference.csfiles found no element.Add()callers or bare-collection-init, so native heads keep compiling.Given_ThemeResource(15),Given_FrameworkElement_ThemeResources,Given_ContentControl, plus the migratedGiven_UIElement/Given_UnoFocusInputHandlercases. This specifically guards theEnterProperties/LeavePropertiesnamescope/theme walk: a detachedFrameworkElementset as a property value used to also matchis IEnumerablethere and have its visual children iterated — an accidental divergence from the WinUI code being ported (WinUI'sFrameworkElementisn'tIEnumerable, so that branch only ever handled genuine DO-collections). Removal aligns Uno with WinUI; theme/namescope propagation is unchanged (children still enter via the visual walk on activation).PackageDiffIgnore.xml(6.5 baseline) gets two entries for the removed declared members:FrameworkElement.GetEnumerator()and theBorder/Panel/ScrollViewerAdd(UIElement)methods. The interface-list change itself isn't tracked by the gate.PR Checklist ✅
Screenshots Compare Test Runresults — N/A (no visual change).Breaking change — impact & migration path
FrameworkElement/ContentControlno longer implementIEnumerable. C#-markup collection-initializer child syntax (new Panel { child },new Border { child },new ScrollViewer { content }) no longer compiles, and the publicAdd(UIElement)helpers onBorder/Panel/ScrollViewerare gone.foreach/LINQ directly over aFrameworkElementno longer compiles.Children = { … }for panels,Child = …forBorder,Content = …forScrollViewer(see the table above). For enumerating children, useVisualTreeHelperor the panel'sChildren. This matches WinUI, whoseFrameworkElement/ContentControlwere neverIEnumerable.