locked
How to detect swipe horizontal or vertical in Flip View (XAML) by C++?

    Question

  • I am trying to use Flip View and want to know how to capture swipe in horizontal or in vertical. I read the source code of the Flip View XAML sample but can not find the way. Any solutions?
    Wednesday, April 9, 2014 6:15 PM

All replies

  • Can you please explain in more detail what you are trying to do. Are you trying to capture gestures on items within the FlipView or on the FlipView itself?

    It is non-trivial to share gesture handling with the FlipView's ScrollViewer. You need to determine on the first touch if the app will handle the gesture itself or let the ScrollViewer handle it.

    See my blog entry Where did all my gestures go? for a discussion of how this sharing works (and doesn't work).

    For more complicated gesture handling you may need to disable the FlipView's scroll handling and implement it yourself. On Windows 8.1 you can use the ScrollViewer's new ChangeView methods to have it animate to the new position.

    --Rob

    Thursday, April 10, 2014 12:19 AM
    Moderator
  • What I want is When I swipe left or right on FlipView the orientation is set to horizontal. When I swipe up or down on FlipView the orientation is set to vertical. So I need to capture the swipe orientation.

    May be the question is how to detect scroll horizontal or vertical in FlipView.
    Thursday, April 10, 2014 10:21 AM