maui
maui copied to clipboard
[macOS] CollectionView.Header with a Grid - incorrect fixed width - does not resize
Description
The Header of a CollectionView does not size appropriately according to the Grid.Columndefinitions.
Tested same code on Windows where it does work like expected.
Steps to Reproduce
- Clone the repro repository.
- Launch the app on macOS.
- Resize the window.
- The elements in the CollectionView will resize, the header will stay a fixed width.
Using CollectionView.HeaderTemplate together with a DateTemplate does not seem to matter. Running the same code on Windows gives the desired effect where the Headers resize appropriately with the collums.
Link to public reproduction project repository
https://github.com/AlexVDV116/CollectionViewHeaders
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
macOS Sonoma 14.4.1
Did you find any workaround?
Extracting the GRID out of the CollectionView.Header and placing it above the CollectionView using a VerticalStackLayout, or using a ListView and its headers do provide me the desired effect. However this does not make use of the CollectionView Headers.
Relevant log output
No response
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- Header of the CollectionView is wider than the actual element (#9194), similarity score: 0.83
- [regression/8.0.3] Grid in CollectionView HeaderTemplate takes the whole page in iOS (#18886), similarity score: 0.80
- Group in a CollectionView on windows does not span horizontally (#16824), similarity score: 0.79
Closed similar issues:
- On iOS, CollectionView Header size changed causes overlap (#20538), similarity score: 0.81
- CollectionView inside a Grid completely wrong measurements. (#15553), similarity score: 0.78
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Verified this issue with Visual Studio 17.6.12(build410) (8.0.21 & 8.0.6). Can repro it.