dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.26k stars 1.76k forks source link

[iOS] Fixed HeaderFooterGrid to pass on CV1 and CV2 #26022

Open devanathan-vaithiyanathan opened 12 hours ago

devanathan-vaithiyanathan commented 12 hours ago

Issue details

The size of the CollectionView, including the header and footer, is not rendered correctly on the UI in CV1 but displays correctly in CV2.

Root cause

The GetSize() method calculated the size of the CollectionView based only on its content, ignoring the header and footer sizes. This caused incorrect height or width rendering when a header or footer was used.

Description of Change

The fix calculates the sizes of the header and footer using helper methods, This ensures the total size includes all elements, and the result is adjusted to fit within the CollectionView bounds.

Issues Fixed

Fixes #25773

Tested the behaviour in the following platforms

Output Screenshot

Before After
dotnet-policy-service[bot] commented 12 hours ago

Hey there @devanathan-vaithiyanathan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.