4,029 questions
how to use a tapgesture inside a Grid to access one of many images?
Will Autio
5
Reputation points
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
Sign in to answer