There is a proposal to include this in the MAUI Community Toolkit: [Proposal] TouchEffect.
And you requirement is implementing this on the Android and iOS. So you can try to use the platform code to do that:
For the android, you can use the ImageView's Long Click event to do that. Such as:
#if ANDROID (image.Handler.PlatformView as Android.Widget.ImageView).LongClick +=(s,e)=> { //do something } #end if
And you can also declare a View.OnLongClickListener and then set the it for the image. Such as:
public class MyListener : Java.Lang.Object, Android.Views.View.IOnLongClickListener { public bool OnLongClick(Android.Views.View? v) { //do what you want here } } ===== #if ANDROID (image.Handler.PlatformView as Android.Widget.ImageView).SetOnLongClickListener(new MyListener()); #end if
And for the ios, you can use the UILongPressGestureRecognizer:
#if IOS (image.handler.PlatformView as UIKit.UIImageView).UserInteractionEnabled = true; (image.handler.PlatformView as UIKit.UIImageView).AddGestureRecognizer(new UILongPressGestureRecognizer(MethodName())); #endif
And the effect after the long press, you can use the popup to do it.