Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.Net Maui LongPress

Tags:

c#

.net

maui

I have a page that contains a CollectionView of images. I want the user to be able to LongPress on an image and then they will have the option to delete or edit the image.

I'm trying to implement LongPress functionality in my .Net Maui project, however I can't find any documentation for this. How do you guys handle LongPress? Am I missing something?

like image 392
CindyLou Avatar asked Sep 07 '25 17:09

CindyLou


1 Answers

Due to the TouchEffect has not yet been ported from Xamarin Community Toolkit to Maui Community Toolkit, you can add the Xamarin.CommunityToolkit.MauiCompat 2.0.2-preview1013 to your project. It is the .NET MAUI Compatible version of Xamarin.CommunityToolkit.

Here is the codes you can directly run in the package manager console to add this package:

NuGet\Install-Package Xamarin.CommunityToolkit.MauiCompat -Version 2.0.2-preview1013
like image 157
Guangyu Bai - MSFT Avatar answered Sep 09 '25 08:09

Guangyu Bai - MSFT