Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwipeGestureRecognizer return actual detected directions #20619

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

espenrl
Copy link
Contributor

@espenrl espenrl commented Feb 15, 2024

Description of Change

As of the current behavior SwipeGestureRecognizer passes its Direction property to SwipedEventArgs upon detection. That works for most scenarios, but it doesn't deal with the fact that SwipeDirection enum is a flag enumeration.

An example where this becomes an issue. If SwipeGestureRecognizer is configured with Direction = SwipeDirection.Up | SwipeDirection.Down and the actual detected direction is Up the SwipedEventArgs.Direction will still be SwipeDirection.Up | SwipeDirection.Down and thus it's not possible to know what direction was actually detected.

This PR makes sure the actual detected direction(s) is passed to SwipedEventArgs.

@espenrl espenrl requested a review from a team as a code owner February 15, 2024 16:35
@ghost ghost added the community ✨ Community Contribution label Feb 15, 2024
@ghost
Copy link

ghost commented Feb 15, 2024

Hey there @espenrl! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jsuarezruiz jsuarezruiz added the area-gestures Gesture types label Feb 21, 2024
@rmarinho
Copy link
Member

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis
Copy link
Member

/rebase

@github-actions github-actions bot force-pushed the SwipeGestureRecognizer branch from 19c2e50 to dd50d44 Compare March 1, 2024 16:14
@jfversluis
Copy link
Member

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rmarinho rmarinho merged commit ad28b65 into dotnet:main Mar 4, 2024
45 of 47 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants