how to use a tapgesture inside a Grid to access one of many images?

Will Autio 5 Reputation points
2023-12-18T21:12:58.3166667+00:00

In Xamarin Forms I was able to set up a Grid with a bunch of Images contained in it and tap on an Image and do stuff with it. Here is a snippet of the code:

	<Grid Padding="5"
		xct:TouchEffect.Command="{Binding PhotoPressCommand,
			Source={RelativeSource AncestorType={x:Type pg:GalleryViewModel}}}"
		xct:TouchEffect.CommandParameter="{Binding .}"

		xct:TouchEffect.LongPressCommand="{Binding PhotoLongPressCommand,
			Source={RelativeSource AncestorType={x:Type pg:GalleryViewModel}}}"
		xct:TouchEffect.LongPressCommandParameter="{Binding .}"

		xct:TouchEffect.PressedScale="1.2"
		xct:TouchEffect.NativeAnimation="True">

		<Image                         
			Source="{Binding Path}"    
			Aspect="AspectFit"
			HeightRequest="70" 
			WidthRequest="120"
		/>
			<!---->

		<Image
			x:Name="CheckIcon"
			Source="{FontImage FontFamily=FontAwesome,
			Glyph={x:Static app:IconFont.CheckSquare},
			Color=Yellow,
			Size=18}"
			VerticalOptions="End"
			HorizontalOptions="Start"
			Margin="4"
		/>

	</Grid>


How can I do something like this in .Net MAUI?

Thanks

Developer technologies | .NET | .NET MAUI
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.