Description
Horizontally oriented CollectionView on Windows has non-existent padding for items.
Windows
Android
Steps to Reproduce
- Create a new project.
- Modify the MainPage.xaml file:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.MainPage">
<Grid RowDefinitions="*,*,*">
<BoxView Grid.Row="0" BackgroundColor="Black"/>
<Grid Grid.Row="1" ColumnDefinitions="*,*,*">
<CollectionView Grid.Column="0" Background="Transparent" SelectionMode="Single" HorizontalOptions="Center">
<CollectionView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Item VerticalOptions="Start"</x:String>
</x:Array>
</CollectionView.ItemsSource>
<CollectionView.ItemsLayout>
<LinearItemsLayout Orientation="Horizontal" ItemSpacing="10" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Label Text="{Binding}" Background="Red" TextColor="White" HeightRequest="25" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" VerticalOptions="Start"/>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<CollectionView Grid.Column="1" Background="Transparent" SelectionMode="Single" HorizontalOptions="Center">
<CollectionView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Item VerticalOptions="Center"</x:String>
</x:Array>
</CollectionView.ItemsSource>
<CollectionView.ItemsLayout>
<LinearItemsLayout Orientation="Horizontal" ItemSpacing="10" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Label Text="{Binding}" Background="Red" TextColor="White" HeightRequest="25" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" VerticalOptions="Center"/>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<CollectionView Grid.Column="2" Background="Transparent" SelectionMode="Single" HorizontalOptions="Center">
<CollectionView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Item VerticalOptions="End"</x:String>
</x:Array>
</CollectionView.ItemsSource>
<CollectionView.ItemsLayout>
<LinearItemsLayout Orientation="Horizontal" ItemSpacing="10" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Label Text="{Binding}" Background="Red" TextColor="White" HeightRequest="25" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" VerticalOptions="End"/>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
<BoxView Grid.Row="2" BackgroundColor="Black"/>
</Grid>
</ContentPage>
- Run the Windows application.
Link to public reproduction project repository
No response
Version with bug
9.0.111 SR11.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 10 22H2 19045.6456
Did you find any workaround?
No response
Relevant log output
Description
Horizontally oriented CollectionView on Windows has non-existent padding for items.
Windows
Android
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
9.0.111 SR11.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 10 22H2 19045.6456
Did you find any workaround?
No response
Relevant log output