VladislavAntonyuk / MauiSamples

.NET MAUI Samples
https://vladislavantonyuk.azurewebsites.net/articles?categoryName=.NET%20MAUI/Xamarin
MIT License
722 stars 185 forks source link

Card stack layout with flip card #387

Closed erossini closed 5 months ago

erossini commented 11 months ago

Hi, I'm looking at your code for the card stack layout and it is almost what I'm looking for 😁

Basically, I'm learning MAUI and I want to create an app with flash cards. So, I arrived at the point where I display the cards.

image

Now, the problems I'm facing are:

var tapGesture = new TapGestureRecognizer();
tapGesture.Tapped += TapGesture_Tapped;
GestureRecognizers.Add(tapGesture);

Do you have any advice or code for that? Thank you in advance, Enrico

VladislavAntonyuk commented 11 months ago
  1. You can search for this issue in dotnet/MAUI repo. I saw it on Android. You cannot replace/reuse content.
  2. What do you mean by not affecting?
erossini commented 10 months ago

I put together a project as an example of the issue. You can find the project here https://github.com/erossini/MauiCardLayout

VladislavAntonyuk commented 10 months ago

@erossini from what I see PanGesture is executed and cards disappear and appear. TapGesture is executed as well and card flips. As for SwipeGesture, it is a known .NET MAUI issue. You can see that CardView (CardLayout) already has a PanGesture: var panGesture = new PanGestureRecognizer(); panGesture.PanUpdated += PanGesture_PanUpdated; GestureRecognizers.Add(panGesture);

VladislavAntonyuk commented 5 months ago

Updated sample with some animations and tweaks