-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
I've used SFListView control for showing vertical list of data. In that I have to provide Delete feature on Swipe.
So I have implemented EndSwipeTemplate.
iOS
It is working fine.
Android
Not working at all.
Sample Code
<syncfusion:SfListView
x:Name="listView"
AllowSwiping="True"
ItemsSource="{Binding Contacts}"
SwipeThreshold="100"
SwipeOffset="150"
SelectionMode="Multiple"
SelectionGesture="LongPress"
ScrollBarVisibility="Always"
AutoFitMode="Height">
<syncfusion:SfListView.ItemTemplate x:DataType="model:Contact">
<DataTemplate x:Name="EndSwipeTemplate" >
<VerticalStackLayout >
<local:ContactCard BindingContext="{Binding Path=.}">
<local:ContactCard.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding Path=BindingContext.CardSelectedCommand,
Source={Reference Name=_contactCardListPage}}" />
</local:ContactCard.GestureRecognizers>
</local:ContactCard>
</VerticalStackLayout>
</DataTemplate>
</syncfusion:SfListView.ItemTemplate>
<syncfusion:SfListView.EndSwipeTemplate>
<DataTemplate>
<Grid BackgroundColor="#DD0000"
x:Name="listViewGrid">
<Grid.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding Path=BindingContext.DeleteCommand,
Source={x:Reference listView}}"
CommandParameter="{Binding .}" />
</Grid.GestureRecognizers>
<Label Text="Delete"
TextColor="#FFFFFF"
HorizontalOptions="Center"
FontSize="Small"
VerticalOptions="Center">
</Label>
</Grid>
</DataTemplate>
</syncfusion:SfListView.EndSwipeTemplate>
</syncfusion:SfListView>
Metadata
Metadata
Assignees
Labels
No labels