Tried to find workaround and couldn't find any. The only way I discover is to use the same touch-behavior for clicks and rely on "CurrentInteractionStatus", which will be "Completed" after longtap trigger.
<Grid.Behaviors>
<toolkit:TouchBehavior LongPressCompleted="LongPress_Handler" TouchGestureCompleted="Tap_Handler" LongPressDuration="750"/>
</Grid.Behaviors>
.
private void LongPress_Handler(object sender, CommunityToolkit.Maui.Core.LongPressCompletedEventArgs e)
{
Console.WriteLine("Long Tap!");
}
private void Tap_Handler(object sender, CommunityToolkit.Maui.Core.TouchGestureCompletedEventArgs e)
{
var stackItem = (View)sender;
var touch = (CommunityToolkit.Maui.Behaviors.TouchBehavior)stackItem.Behaviors[0];
if (touch.CurrentInteractionStatus == CommunityToolkit.Maui.Core.TouchInteractionStatus.Started)
{
Console.WriteLine("Normal tap!");
}
}
If you find more reliable ways, please share.