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
ItemsRepeater: stale StackLayout extent origin, no cache growth without a Layout, rounding differs from WinUI #25076
area/items-repeaterCategorizes an issue or PR as relevant the ItemsRepeater controlkind/bugSomething isn't workingproject/items 🧾Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
Three small ItemsRepeater gaps, found while reviewing the LinedFlowLayout port (#23691):
StackLayout keeps an outdated extent origin. The Uno-only origin that StackLayout holds across measure passes (StabilizeExtentOrigin) survives changes to Orientation or Spacing, and a layout state reused for a new context. The list is then offset by the stale value.
No cache growth with the default layout. With Layout left null, ViewportManagerWithPlatformFeatures.RegisterCacheBuildWork skips cache build work, so the repeater never realizes items beyond the viewport.
Rounding differs from WinUI. The ported layouts call Math.Round, which rounds halves to even. WinUI's C++ round() rounds halves away from zero, so x.5 averages and layout-rounded bounds can land one unit off.
Expected behavior 🎯
The held origin is dropped when the configuration it was computed for changes.
A repeater with no Layout set grows its cache buffer like one with an explicit StackLayout (WinUI 2.5.1 has no Layout check there).
Rounding matches WinUI.
How to reproduce it (as minimally and precisely as possible) 🔬
Scroll an ItemsRepeater with a StackLayout away from the first item, then change Spacing or Orientation.
Put an ItemsRepeater with no Layout and 100 items of 20px into a 100px-high ScrollViewer. Item 8 is never realized.
Workaround 🛠️
Set Layout = new StackLayout() explicitly for (2).
Renderer 🎨
Skia
Affected platforms 📱💻🖥️
All Skia targets.
Uno.Sdk version (and other relevant versions) 📦
master (7.0 dev)
Anything else we need to know? 💬
The fixes originally rode along in #23691 and were split out because LinedFlowLayout does not need them.
area/items-repeaterCategorizes an issue or PR as relevant the ItemsRepeater controlkind/bugSomething isn't workingproject/items 🧾Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
Activity