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
[Desktop] ItemsWrapGrid does not work in ListView.ItemsPanel when used as ItemsPanelTemplate #19062
<UserControl.Resources>
<CollectionViewSourcex:Name="CategoryCollectionViewSource"IsSourceGrouped="True" />
</UserControl.Resources>
<ListViewItemsSource="{x:Bind CategoryCollectionViewSource.View, Mode=OneWay}"SelectionMode="Single"ShowsScrollingPlaceholders="True"BorderThickness="{ThemeResource ListBoxBorderThemeThickness}"BorderBrush="{ThemeResource ListBoxBorderThemeBrush}"SelectedItem="{x:Bind SelectedItem, Mode=TwoWay}">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<!--If the following line (<ItemsWrapGrid/>) will be commented out and the PRJ will be launched in net9.0-desktop mode, 5 Items (A, B, C, D, E), will be displayed in a ListView. However, if the following line is active, nothing will be displayed. Note: In net9.0-windows it works as expected with and without that line. Our fazit: ItemsWrapGrid is not compatible with net9.0-desktop.-->
<ItemsWrapGrid/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemContainerStyle>
<StyleTargetType="ListViewItem"BasedOn="{StaticResource DefaultListViewItemStyle}">
<SetterProperty="MinWidth"Value="0"/>
<SetterProperty="Margin"Value="0,0"/>
<SetterProperty="Padding"Value="15,0,15,0"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemTemplate>
<DataTemplatex:DataType="local:Item">
<TextBlockText="{x:Bind Label}"HorizontalAlignment="Center"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
In Desktop, the Control ItemsWrapGrid is "available", i.e., it compiles. But at runtime, it does not display. I guess, there is no implementation for it.
In Desktop, the Control ItemsWrapGrid is "available", i.e., it compiles. But at runtime, it does not display. I guess, there is no implementation for it.
Indeed, it's not implemented at this time.
What is your proposal of a workaround?
You can use the ItemsRepeater control and custom layouts to implement a wrap grid, such as the WrapLayout.
It's not a bug in this case, it's a missing feature. At this time this has not been prioritized by our clients and we do not have a timeline for an implementation.
... for your overview, I have here collected the nature of the workaround using ItemsRepeader. The problem seems for me newbie to be with the ItemsSource for the ItemsRepeater.
First, I succeeded to use the ItemsRepeater as the Main Content of MySandboxControl:
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
This is still a major missing feature on all Skia platforms. ItemsRepeater is a weak replacement, since it misses important features such as selection handling and selection visualization. ItemsRepeater is also buggy on Uno.
More context from the .NET MAUI side. On Uno 7.0.0-dev.763 (and master), ItemsWrapGrid is still a [NotImplemented] generated stub on Skia. As an ItemsPanel it isn't an IVirtualizingPanel, so it realizes every container up front.
.NET MAUI's Windows CollectionView with GridItemsLayout (src/Controls/src/Core/Handlers/Items/*.Windows.cs) picks ItemsWrapGrid. So reusing MAUI's WinUI handlers on Uno Skia or WASM can't virtualize grids.
unoplatform/uno.maui.renderer measured a 100,000-item grid freezing the browser. For now it works around this with an ItemsRepeater + UniformGridLayout presenter.
A virtualizing Skia ItemsWrapGrid would remove the need for that custom presenter. Details are in unoplatform/uno.maui.renderer#12.
I think it was supposed to solve this, by creating a virtualizing ItermsWrapGrid. I got quite excited when I saw that PR. AI generated a lot of the code, probably based on the wrap grid for other platforms. But then looks like the PR just got closed without further explanation. Shouldn't it be possible to get this fixed in reasonable amount of time with AI support?
Activity
jeromelaban commentedon Dec 11, 2024
Thanks the report. This is indeed currently not yet supported for desktop #4023. Using
ItemsRepeatercan be another way to implement this.DevTKSS commentedon Dec 18, 2024
@jeromelaban can you tell the reason for it to not work or is it only the itemswrapgrid control which is just not jet available?
MichaelJachan commentedon Dec 18, 2024
Dear Jerome! I am the coworker of Tomasz.
In Desktop, the Control ItemsWrapGrid is "available", i.e., it compiles. But at runtime, it does not display. I guess, there is no implementation for it.
What is your proposal of a workaround?
Best, Michael :)
jeromelaban commentedon Dec 18, 2024
Indeed, it's not implemented at this time.
You can use the
ItemsRepeatercontrol and custom layouts to implement a wrap grid, such as theWrapLayout.MichaelJachan commentedon Dec 19, 2024
Good Morning! You said, ItemsWrapGrid is already implemented (also in Desktop)? When can we expect a bugfix?
Best, Michael
jeromelaban commentedon Dec 19, 2024
My apologies, my answer missed a
not.It's not a bug in this case, it's a missing feature. At this time this has not been prioritized by our clients and we do not have a timeline for an implementation.
MichaelJachan commentedon Dec 19, 2024
OK. Then, I would urgently need a workaround, which replaces the ItemsWrapGrid, in order to implement an AccordionControl based on a ListView please:)
MichaelJachan commentedon Dec 19, 2024
@jeromelaban:
... for your overview, I have here collected the nature of the workaround using ItemsRepeader. The problem seems for me newbie to be with the ItemsSource for the ItemsRepeater.
First, I succeeded to use the ItemsRepeater as the Main Content of MySandboxControl:
And it does what is expected: 10 strings (MyItems) are displayed and wrapped according to the width of the window.
BUT SECOND, my actual case is more involved. The original ItemsWrapGrid is used within a ListView-ItemsPanelTemplate like that:
THUS, I guess, I need to use the new ItemsRepeater like:
BUT I did not succeed to set an
ItemsSourcefor theItemsRepeater.jeromelaban commentedon Dec 19, 2024
Thanks for the update. It's best if you open a discussion with your sample code, as it's not related to the
ItemsWrapGridissue.github-actions commentedon May 10, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
lukasf commentedon Aug 19, 2026
This is still a major missing feature on all Skia platforms. ItemsRepeater is a weak replacement, since it misses important features such as selection handling and selection visualization. ItemsRepeater is also buggy on Uno.
MartinZikmund commentedon Sep 28, 2026
More context from the .NET MAUI side. On Uno 7.0.0-dev.763 (and master),
ItemsWrapGridis still a[NotImplemented]generated stub on Skia. As anItemsPanelit isn't anIVirtualizingPanel, so it realizes every container up front.CollectionViewwithGridItemsLayout(src/Controls/src/Core/Handlers/Items/*.Windows.cs) picksItemsWrapGrid. So reusing MAUI's WinUI handlers on Uno Skia or WASM can't virtualize grids.ItemsRepeater+UniformGridLayoutpresenter.A virtualizing Skia
ItemsWrapGridwould remove the need for that custom presenter. Details are in unoplatform/uno.maui.renderer#12.🤖 Generated with Claude Code
lukasf commentedon Oct 7, 2026
What happened to this PR?
#21968
I think it was supposed to solve this, by creating a virtualizing ItermsWrapGrid. I got quite excited when I saw that PR. AI generated a lot of the code, probably based on the wrap grid for other platforms. But then looks like the PR just got closed without further explanation. Shouldn't it be possible to get this fixed in reasonable amount of time with AI support?