XF-Material-Library icon indicating copy to clipboard operation
XF-Material-Library copied to clipboard

Long Click on Cards

Open Informatheus opened this issue 4 years ago • 2 comments

Using Xamarin Forms

I have a ListView where itens are MaterialCards. A way of capturing a long click on the card would help me a lot.

Informatheus avatar Feb 29 '20 04:02 Informatheus

this is probably more a Xamarin Forms issue than XF-Material. However, Xamarin 4.6 (next version) is supposedly going to release with Long Press functionality for gesture recognizers. You could download the midnight build of Xamarin Forms and add a gesture recognizer around the Card component.

<material:CardView IsClickable="True">
    <material:CardView.GestureRecognizers>
        <LongPressGestureRecognizer
                IsLongPressing="{Binding IsLongPressing}"
                LongPressed="{Binding OnLongPressed}" />
  </material:CardView.GestureRecognizers>
</material:CardView>`

ske66 avatar Mar 05 '20 09:03 ske66

Thank you very much for your attemption.

Informatheus avatar Mar 05 '20 13:03 Informatheus