I need both long-press and short-press in a list
I am using effects for long-press for items in a list (ListView/CollectionView) but when that works the short-press (tap) doesn't!
My question is: Do I need to create another effects version that is short-click or can I somehow have both? I have searched everywhere without any information to help me discover a solution...
I have been playing around with this code in my repository with out being able to make both work at the same time.
<CollectionView
x:Name="carsCollection"
ItemsSource="{Binding Cars}"
SelectionMode="Single"
SelectionChangedCommand="{Binding TapCommand}"
SelectionChangedCommandParameter="{Binding Source={x:Reference carsCollection}, Path=SelectedItem}"
BackgroundColor="Orange">
<CollectionView.ItemTemplate>
<DataTemplate>
<ContentView>
<StackLayout
effects:LongPressedEffect.Command="{Binding Path=BindingContext.LongTapCommand, Source={x:Reference ThisPage}}"
effects:LongPressedEffect.CommandParameter="{Binding .}">
<Label Text="CollectionView: Long Press works but not normal selection" />
<StackLayout.Effects>
<effects:LongPressedEffect />
</StackLayout.Effects>
</StackLayout>
</ContentView>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
The ViewModel containing the commands is here.