I am trying to achieve CollectionView with right swipe for item deletion. I know how to do it in Xamarin, I read MAUI documentation and samples around SwipeView but it simply isn't there. This is what I have, tested on windows platform.
EDIT - I've put SwipeView into DataTemplete of CollectionView, but its not working either, check the sample.
EDIT2 - It work's on Android, probably on iOS too, so this looks like Windows feature.
<SwipeView
Threshold="200">
<SwipeView.RightItems>
<SwipeItems>
<SwipeItemView>
<!--Delete icon-->
<Frame
Grid.Column="0"
VerticalOptions="Fill"
HorizontalOptions="Fill"
WidthRequest="88"
BackgroundColor="red">
<Grid VerticalOptions="Center" HorizontalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!--Delete-->
<Label
Text="D"
FontSize="25"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand" />
</Grid>
</Frame>
</SwipeItemView>
</SwipeItems>
</SwipeView.RightItems>
<!-- Content of SwipeView-->
<CollectionView
x:Name="fro_CollectionView"
VerticalScrollBarVisibility="Always"
SelectionMode="Single"
VerticalOptions="Fill"
HorizontalOptions="Fill"
MinimumHeightRequest="5"
ItemsSource="{Binding StockCards}">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="Models:StockCard">
<Grid Padding="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Text="{Binding Name}"/>
<Label Grid.Row="0" Grid.Column="1" Text="{Binding Price}"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</SwipeView>