CollectionView inside a Grid completely wrong measurements. #15553
Labels
area-controls-collectionview
CollectionView, CarouselView, IndicatorView
area-layout
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
platform/iOS 🍎
t/bug
Something isn't working
Description
Grid is broken when a collection view is added inside.
On screenshot
RowDefinitions="auto,*,auto,*"
Without CollectionView it appears to be calculating heights fine.
![simulator_screenshot_960653E2-EA2F-4122-8F00-C3AC885BE58F](https://private-user-images.githubusercontent.com/28758721/244749644-49ff4aa9-e500-424d-b25b-f45353a1ddba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4NjU4MTUsIm5iZiI6MTcyNTg2NTUxNSwicGF0aCI6Ii8yODc1ODcyMS8yNDQ3NDk2NDQtNDlmZjRhYTktZTUwMC00MjRkLWIyNWItZjQ1MzUzYTFkZGJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA5VDA3MDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIxNTFjYjllNjdiMzI4Y2FjMjM3ZjMxYjM1ZWU4NzM4MzNlZmY4ODZkMWNhYjNlYzkxMmI2YjJiZmQyYzcwNTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.V4xzEFVq1zSSk40EPS8qqv_bLgILtmn8rfT44aOvw3Y)
When you show CollectionView everything is calculated wrong.
![simulator_screenshot_53F504C2-2843-43D0-A371-C3E1CF3E48CC](https://private-user-images.githubusercontent.com/28758721/244749557-e906fc52-ed79-47a7-95fc-ff0ed46b315a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4NjU4MTUsIm5iZiI6MTcyNTg2NTUxNSwicGF0aCI6Ii8yODc1ODcyMS8yNDQ3NDk1NTctZTkwNmZjNTItZWQ3OS00N2E3LTk1ZmMtZmYwZWQ0NmIzMTVhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA5VDA3MDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5YTYwNjRhZDY3YTg0ZWRkMTJlMDA2ZDJlNTUxNDM2N2I1ODI0OTk5OWVmZGZkYTgyZDc4OWQxMzJlNTM0NjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xbqJu025kyT27z2b4LXPa7k7uNUXNOj0OkcM6Iu5xCA)
In same cases turning on RowSpacing would cause the collection view to grow in size by the amount of rows - 1 times the row spacing. Everything seems so unstable it's ridiculous...
Steps to Reproduce
Link to public reproduction project repository
https://github.com/Hooterr/MauiGridBugs
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16.4
Did you find any workaround?
This is so basic it should work without any workarounds.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: