Hello,
As you said if you do not set the ItemSpacing
property for CollectionView.ItemsLayout, this is by design that default line spacing is 0, please check this document: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/collectionview/layout#item-spacing
By default, there is no space between each item in a CollectionView
>>The visual line spacing is larger than the height of the text fonts which simply does not look good,
We can also see that in Windows platform that even if we have set the ItemSpacing is 0, line spacing still looks bigger than Andorid platform.
May I know what is your desired layout? If you just want to have a smaller line spacing, maybe you can use FlexLayout
control:
<FlexLayout
Direction="Column"
BindableLayout.ItemsSource="{Binding Items}">
<BindableLayout.ItemTemplate>
<DataTemplate>
…
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.