<listView:SfListView x:Name="listView" ItemSize="70" AutoFitMode="Height"
IsStickyFooter="True" IsStickyHeader="True"
ItemsSource="{Binding ContactsInfo}"
ItemSpacing="0,0,5,0">
…
<listView:SfListView.FooterTemplate>
<DataTemplate>
<Grid BackgroundColor="Teal">
<Image Source="Tap.jpg"
VerticalOptions="Center" HorizontalOptions="Center" Aspect="AspectFit"
HeightRequest="50" WidthRequest="50">
<Image.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding Path=BindingContext.TapCommand,
Source = {x:Reference listView}}"
CommandParameter="{Binding .}" />
</Image.GestureRecognizers>
</Image>
</Grid>
</DataTemplate>
</listView:SfListView.FooterTemplate>
</listView:SfListView> |
private void OnTapped(object obj)
{
Application.Current.MainPage.DisplayAlert("FooterItem", "Tapped Item is Footer", "OK");
} |