CollectionView size not updating
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
If I set a CollectionView inside of another CollectionView the outer does not update the size of its elements if the inner grows.
Resizeing the window forces the CollectionView to update correctly.
I experianced the issue when i was trying to transport the app from Xamarin.Forms to MAUI. The same code in Xamarin works fine.
https://user-images.githubusercontent.com/43877134/178154039-10a06fac-e055-4faa-8470-4e0a2d9a3f5d.mp4
Again resizeing the window helps. Unfortunately the screen recorder does not support this and breakes.
### Steps to Reproduce
Put a CollectionView inside of another CollectionView.
My code in the app is like this:
### Version with bug
6.0.400 (current)
### Last version that worked well
Unknown/Other
### Affected platforms
iOS, Windows, I was *not* able test on other platforms
### Affected platform versions
iOS 14 and later, windows10.0.19041.0
### Did you find any workaround?
No. I tried to force the update of the view manually by the Page.ForceLayout() and IView.InvalidateMeasure() / IView.InvalidateArrange(). Didn't work!
### Relevant log output
_No response_
Contributor guide
Research direction
The payload names no implementation files or regression test. Start by reproducing the nested CollectionView case from the supplied XAML on iOS or Windows, then observe layout behavior as the inner collection grows and after a window resize. Done means the outer CollectionView updates its element sizes without requiring a window resize.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100