-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] CollectionView with header or footer has incorrect height #27808
Copy link
Copy link
Closed
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewpartner/syncfusion/reviewplatform/ioss/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
When using a CollectionView with a HeaderTemplate or FooterTemplate, the calculated height of the CollectionView does not include the height of the header and footer. As a result, the total height of the CollectionView is incorrectly measured, leading to unexpected UI issues.
<VerticalStackLayout>
<CollectionView>
<CollectionView.ItemsSource>
<Array Type="{x:Type x:String}">
<x:String>item1</x:String>
<x:String>item2</x:String>
<x:String>item3</x:String>
</Array>
</CollectionView.ItemsSource>
<CollectionView.ItemTemplate>
<DataTemplate>
<Label AutomationId="{Binding .}"
Text="{Binding .}"/>
</DataTemplate>
</CollectionView.ItemTemplate>
<CollectionView.HeaderTemplate>
<DataTemplate>
<BoxView HeightRequest="100"
BackgroundColor="Green"/>
</DataTemplate>
</CollectionView.HeaderTemplate>
<CollectionView.FooterTemplate>
<DataTemplate>
<BoxView HeightRequest="200"
BackgroundColor="Blue"/>
</DataTemplate>
</CollectionView.FooterTemplate>
</CollectionView>
</VerticalStackLayout>| Expected (Android) | Actual (iOS) |
|---|---|
![]() |
![]() |
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.40 SR4
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewpartner/syncfusion/reviewplatform/ioss/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done

