Description
openedon Jun 26, 2024
Description
I have a CollectionView with several items and I want to make a 2 or more columns layout on wide screens and a 1 column layout on tall screens.
I tried setting a GridItemsLayout and changing the Span in sizechanged event and set the same in button click event, but that did not work and then I tried changing the entire ItemsLayout, but still no updates in the app.
Restarting the app works, so this is just the result of changing at runtime.
Steps to Reproduce
Add a CollectionView with items, and then say write this code to toggle the layout on page size changes:
private void OnSizeChanged(object? sender, EventArgs e) =>
collectionView.ItemsLayout = Width > 600
? new GridItemsLayout(2, ItemsLayoutOrientation.Vertical)
: new LinearItemsLayout(ItemsLayoutOrientation.Vertical);
Link to public reproduction project repository
No response
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
All
Did you find any workaround?
No response
Relevant log output
No response