Open
Description
Description
When using a CollectionView in a .NET MAUI Windows application, reassigning the ItemsLayout to a new GridItemsLayout prevents the span from being dynamically changed.
Behavior observed from public reproducer app:
- Initially, clicking the "Increase Span" button successfully increases the span of the grid layout.
- Reassigning the
ItemsLayout
to a newGridItemsLayout
with the same initial span of 3. - After reassignment, clicking the "Increase Span" button no longer changes the span of the grid layout.
Steps to Reproduce
To create a barebone reproducer,
- Create MAUI application and Configure a
CollectionView
with dummy data. - Initialize CollectionView's
ItemsLayout
tonew GridItemsLayout(2, ItemsLayoutOrientation.Vertical)
. - Now reinitialize same
ItemsLayout
tonew GridItemsLayout(3, ItemsLayoutOrientation.Vertical)
- Observe span of the Grid in CollectionView.
Expected Outcome: Column Span changes from 2 to 3
Observed Outcome: Column Span does not changes.
Link to public reproduction project repository
https://github.com/prathameshnarkhede/collectionviewitemslayoutbug.git
Version with bug
9.0.0-preview.7.24407.4
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
No response
Did you find any workaround?
Instead of reinitializing ItemsLayout
, Added increment to GridItemsLayout.Span
Property
Relevant log output
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment