Xamarin forms long press gesture recognizer in listview

GweonhoGweonho ✭✭Member ✭✭


<ListView.ItemTemplate>


<ViewCell.View>

<Grid.ColumnDefinitions>



</Grid.ColumnDefinitions>

<lb:Gestures.Interests>



</lb:Gestures.Interests>

<Image.GestureRecognizers>

</Image.GestureRecognizers>

                                                        <Image.GestureRecognizers>
                                                            <TapGestureRecognizer Command="{Binding GuideLineCommand, Source={x:Reference StartPage}}" CommandParameter="{Binding ImageSource1}" />
                                                        </Image.GestureRecognizers>
                                                    </Image>
                                                    <Image Source="{Binding ImageSource3}" Grid.Column="2" BackgroundColor="White" >

                                                        <Image.GestureRecognizers>
                                                            <TapGestureRecognizer Command="{Binding GuideLineCommand, Source={x:Reference StartPage}}" CommandParameter="{Binding ImageSource1}" />
                                                        </Image.GestureRecognizers>

                                                    </Image>

                                                </lc:GesturesContentView>
                                            </Grid>
                                        </ViewCell.View>
                                    </ViewCell>
                                </DataTemplate>
                            </ListView.ItemTemplate>
                        </ListView>

my code

i want to add long press function for image in listview
but i don`t know how to do

<Image.GestureRecognizers>
</Image.GestureRecognizers>

how to use two function singleTap and Longpress

help me plz

Answers

Sign In or Register to comment.