Advertisement
EdGr87

Untitled

Sep 20th, 2022
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.64 KB | None | 0 0
  1.   <CollectionView
  2.             x:Name="CarsList"
  3.             ItemsSource="{Binding Cars}"
  4.             SelectionMode="None">
  5.             <CollectionView.ItemTemplate>
  6.                 <DataTemplate>
  7.                     <SwipeView>
  8.                         <SwipeView.RightItems>
  9.                             <SwipeItems Mode="Execute">
  10.                                 <SwipeItem
  11.                                     BackgroundColor="Red"
  12.                                     Command="{Binding Source={x:Reference ListPage}, Path=BindingContext.DeleteCommand}"
  13.                                     CommandParameter="{Binding .}"
  14.                                     Text="Delete" />
  15.                             </SwipeItems>
  16.                         </SwipeView.RightItems>
  17.                         <local:CarView
  18.                             Padding="0,10,0,0"
  19.                             xct:TouchEffect.AnimationEasing="CubicInOut"
  20.                             xct:TouchEffect.Command="{Binding Source={x:Reference ListPage}, Path=BindingContext.PressedCommand}"
  21.                             xct:TouchEffect.CommandParameter="{Binding .}"
  22.                             xct:TouchEffect.LongPressCommand="{Binding Source={x:Reference ListPage}, Path=BindingContext.LongPressedCommand}"
  23.                             xct:TouchEffect.LongPressCommandParameter="{Binding .}"
  24.                             xct:TouchEffect.NativeAnimation="True"
  25.                             xct:TouchEffect.PressedScale="0.8" />
  26.                     </SwipeView>
  27.                 </DataTemplate>
  28.             </CollectionView.ItemTemplate>
  29.         </CollectionView>
  30.     </ContentPage.Content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement