The Swiped event of SwipeGestureRecognizer does not contain actual direction
Create a new page and in Xaml:
<!-- Swipe Gesture -->
<Label Text="Swipe Gesture" class="featureHeader" Margin="0,20,0,10"/>
<BoxView BackgroundColor="Black" Margin="0,0,0,10" HeightRequest="1"/>
<Label Text="Swipe right-to-left or left-to-right on the green box below." Margin="0,10"/>
<BoxView BackgroundColor="Lime" WidthRequest="300" HeightRequest="300">
<BoxView.GestureRecognizers>
<SwipeGestureRecognizer
Direction="Right, Left"
Swiped="SwipeGestureRecognizer_Swiped" />
</BoxView.GestureRecognizers>
</BoxView>
In code:
private async void SwipeGestureRecognizer_Swiped(object sender, SwipedEventArgs e)
{
await DisplayAlert("Swiper No Swiping!", $"Yay! You swiped to the {e.Direction}!", "Close");
}
Run the app and swipe either way,
code sample taken from TheLittleThingsPlayground

The message should tell the actual direction of the swipe, either Right or Left, I didn't swipe in both directions at the same time
Testing on:
@Omarkth Good suggestion. A workaround in the meantime is to use two separate SwipeGestureRecognizers on the view.
Thanks @velocitysystems, but actually it's not a good suggestion, it's a bug 😉
It looks like currently SwipedEventArgs always sends the directions that the Recognizer is set to recognize rather than the direction that actually occurred. If you want to find out what direction actually occured, setting two recognizers, each with only one direction, should work.
Guys, appreciate your comments, but I'm reporting a bug here. I would have gone to StackOverflow if I was looking for a solution or a workaround.
@Omarkth I worked on the original PR contribution for this with @seanyda.
While you are right in saying this is a bug, it was due to that the fact that the original design didn't support multiple directions being passed to a single recognizer. This was added later, and it looks like full support for this never was implemented.
I am happy to implement this in a PR if it is approved as I think this would be a useful change.
Yeah, I was in no way trying to say this was not a bug, sorry if I came off that way. I was just offering a workaround because it would be shame to have you be blocked on this until it's fixed. Most people who report bugs are also in need of some way to get past them or avoid them, even if that's just a temporary solution, was just trying to help ensure you could continue your work.
I think we might leave this but add DetectedDirection that says what was detected.
@rmarinho The problem with this is the bitwise flag for direction on UISwipeGestureRecognizer.
iOS's UISwipeGestureRecognizer lets you specify multiple directions to listen to, but the delegate method does not provide the actual detected direction. There is no way to find out which swipe direction triggered the recognizer when the delegate message arrives. The only solution is to use separate gesture recognizers.
I wonder if the bit-wise implementation is misleading? Really this is a no-op and just needs clearer driving directions on the XF API that you must only use a single direction per recognizer.
I have implemented the request in a feature branch and will work correctly on all the platforms but iOS. My only other thought is to scrap the use of UISwipeGestureRecognizer on iOS and replace with a UIPanGestureRecognizer and feed the X/Y translation directly through the ISwipeController interface like the other platforms?
Thanks @velocitysystems , I've changed your implementation a bit to support swiping diagonally, please check it in this commit
Most helpful comment
@Omarkth I worked on the original PR contribution for this with @seanyda.
While you are right in saying this is a bug, it was due to that the fact that the original design didn't support multiple directions being passed to a single recognizer. This was added later, and it looks like full support for this never was implemented.
I am happy to implement this in a PR if it is approved as I think this would be a useful change.