AiForms.CollectionView
AiForms.CollectionView copied to clipboard
Padding in HCollectionView
Hey, I am using the HCollectionView and I want to add padding in front of the first element and after last element. Do you know how can I achieve this?
Thanks
@andreipro For now, the HCollectionView hasn't how to set each side margin. But the appearance as that can be displayed by using grouping header.
<ai:HCollectionView
ItemsSource="{Binding ItemsSource}"
Spacing="4"
IsGroupingEnabled="true"
GroupHeaderWidth="10"
BackgroundColor="White"
ColumnWidth="80"
HeightRequest="80"
ItemTemplate="{StaticResource templateA}" >
<ListView.GroupHeaderTemplate>
<DataTemplate>
<ai:ContentCell>
<ContentView BackgroundColor="White" />
</ai:ContentCell>
</DataTemplate>
</ListView.GroupHeaderTemplate>
</ai:HCollectionView>
It use the GroupHeaderWidth instead of each side margin.
ItemsSource contents is:
- Group1
- a actual item
- a actual item
- a actual item
- Group2 (blank)