Repository navigation
Open
Labels
area/porting 🖨️Categorizes an issue or PR as relevant for porting of WinUI codedifficulty/challenging 🤯Categorizes an issue for which the difficulty level is reachable with internals understandingkind/enhancementNew feature or requestno-reproplatform/allCategorizes an issue or PR as relevant to the all platformsproject/items 🧾Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
Description
I'm submitting a...
- Bug report (I searched for similar issues and did not find one)
Current behavior
ListView ItemsSource works in the playground, but seems to have a problem when the ItemsSource is changed after its rendered.
Expected behavior
ListView should redraw with all the items in its ItemsSource when the ItemsSource is changed (and notified)
Minimal reproduction of the problem with instructions
Clone https://github.com/yowl/UnoStandardRefTest/tree/wasmlistview and run the wasm head. Click the Load button and you should get 2 buttons as you do in the UWP head.
Environment
Nuget Package: Uno.UI
Package Version(s): 1.43.0-dev.564
Affected platform(s):
- [ ] iOS
- [ ] Android
- [ x] WebAssembly
- [ ] Windows
- [ ] Build tasks
Visual Studio
- [ ] 2017 (version: )
- [ ] 2017 Preview (version: )
- [ ] for Mac (version: )
Relevant plugins
- [ ] Resharper (version: )
Reacted by José Manuel Nieto, Serhii A. Hrytsenko and Martin Zikmund
Reacted by Agnès ZITTE, Joachim Leonfellner, Martin Zikmund and SongOfYouth
Metadata
Metadata
Assignees
Labels
area/porting 🖨️Categorizes an issue or PR as relevant for porting of WinUI codedifficulty/challenging 🤯Categorizes an issue for which the difficulty level is reachable with internals understandingkind/enhancementNew feature or requestno-reproplatform/allCategorizes an issue or PR as relevant to the all platformsproject/items 🧾Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
Activity
yowl commentedon Dec 26, 2018
Bindingandx:Bindbehave the same.jeromelaban commentedon Jan 11, 2019
This may have been fixed by #484, could you revalidate with latest master ?
yowl commentedon Jan 11, 2019
I'm still just getting the one item shown with Uno.UI 1.43.0-dev.614
yowl commentedon Jan 14, 2019
As a simplification you can remove the binding and change the Xaml to
And in the button click
One item will appear and
Items.Countshows0yowl commentedon Jan 14, 2019
and simpler:
is the same. I see
https://github.com/nventive/Uno/blob/0a00b15b736983daa19474b8cb9fd667059ab2cd/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsControl.cs#L291
so can forget about
Items.Countas that seems like a known differencecarldebilly commentedon Jan 16, 2019
I just realized the problem is not related to the Items: if you check in the DOM, you can see your 2 items are there. They are "just" not arranged correctly.
I'll continue my investigations to fix this problem...
yowl commentedon Jan 16, 2019
When I wrote this I thought it was the Items so sorry if I misled you there.
carldebilly commentedon Jan 21, 2019
Source of the problem : ItemsWrapGrid is not implemented on Wasm. Only ItemsStackPanel is.
When a
Panelis not implemented, only the first child gets measured & arranged, that's the default behavior of aFrameworkElement.Possible workarounds:
WrapPanelinstead, if you only have few items, it will work without the virtualization.ItemsStackPanelwhich is impletement on Wasm and will virtualize.WrapPanelonly on Wasm.4[-]wasm ListView ItemsSource does not update when changed[/-][+][wasm] WrapGrid not supported[/+][-][wasm] WrapGrid not supported[/-][+][wasm] `ItemsWrapGrid` not supported[/+]16 remaining items
SuperJMN commentedon Sep 28, 2021
I thinks this #4023 is related with this issue.
[-][wasm] ItemsWrapGrid (virtualizing GridView) not supported[/-][+][WASM] Support for `ItemsWrapGrid`[/+][-][WASM] Support for `ItemsWrapGrid`[/-][+]Support for `ItemsWrapGrid`[/+]ListViewimprovements #234ItemsWrapGridis not supported withItemsControl#4023 as a duplicate of this issueMartinZikmund commentedon Apr 7, 2026
Repro generator
This issue was classified as not reproducible with a code sample or test.
Reason:
ItemsWrapGridhas been implemented since this issue was filed and has tests insrc/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_GridView_Items.cs. The WASM-specificListViewItemsSourcerefresh issue described in the body was filed against version 1.43.0 from 2018 and is likely resolved. If specificItemsWrapGridfeatures are still broken, please file a new issue with a targeted reproduction case.MartinZikmund commentedon Oct 11, 2026
Some measurements on the cost of the missing
ItemsWrapGridon Skia, in case they help with prioritization.On master (951b7b4), the default
GridViewstyle inUnoGenericOverlay.xamluses a plain, non-virtualizingWrapPanelasItemsPanel(its comment saysItemsWrapGridis not implemented on Skia). So every item gets a container up front and keeps it for the lifetime of theGridView.Measured on Skia Desktop (Win32), default
GridViewstyle, 5,000 items, item templateGrid(120x120) { Rectangle(gradient fill), Border { TextBlock } }:GC.GetTotalMemory(true)grows by about 865 MB (about 173 KB per tile) with the oldGridViewItemExpandedtemplate, and about 887 MB (about 177 KB per tile) with theListViewItemPresentertemplateMemory, startup time and per-interaction cost therefore all scale with the item count, so any
GridViewwith more than a few hundred items is affected. The root cause was confirmed by source inspection of the style; the numbers come from a runtime measurement. The retained cost per element (roughly 19-25 KB perUIElement) was not investigated further.Workaround: set a virtualizing
ItemsPanel(e.g.ItemsStackPanel), or useItemsRepeater/ItemsViewwithUniformGridLayout.MartinZikmund commentedon Nov 7, 2026
Status check against current master: this is still open as a feature gap, although the original symptom is long gone.
ItemsWrapGrid) came from the panel being unimplemented and was resolved by the workaround of usingWrapPanel.ItemsWrapGridis still only a generated stub marked[Uno.NotImplemented]for Skia:uno/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ItemsWrapGrid.cs
Lines 5 to 8 in 1f84af6
GridViewstyle therefore swaps in a non-virtualizingWrapPanel:uno/src/Uno.UI/UI/Xaml/Style/Generic/UnoGenericOverlay.xaml
Line 37 in 1f84af6
VirtualizingPanelLayout.managed.cs) only has partial notes aboutItemsWrapGrid(for example aTODO: not appropriate for ItemsWrapGrid), so a real wrap-grid virtualizing layout is still missing.Since the renderers are now Skia everywhere, this applies to all targets rather than only WebAssembly, so I'm updating the platform label. The measurements above show the practical cost for large
GridViews, so the issue is still worth keeping open.This was checked as part of an AI-assisted backlog review by reading the code, not by running it. If it looks wrong, please reply and we will take another look.