locked
Can application continue tracking touch pointer when scrollviewer captures it? RRS feed

  • Question

  • Can application continue tracking touch pointer when ScrollViewer has captured it?

    When user starts scrolling (touch and drag more than 15 px) scrolled content receives PointerCaptureLost and then I 'can find a way how to track the pointer.

    I've tried item.PointerMoved and Window.Current.CoreWindow.PointerMoved and item.AddHandler(ManipulationDeltaEvent and others). But without success.

    Does winRT provide any other API's to track pointers after PointerCaptureLost? Before PointerCaptureLost I can disable/enable scroll from PointerPressed but at this moment I do not want to do it since I actually need the horizontal scrolling by scrollviewer and want to handle vertical pointer move events in my app.

    Alternatively maybe it is possible to prevent PointerCaptureLost for vertical pointer move (since want only horizontal panel scrolling)?

    Monday, December 23, 2013 12:31 PM

Answers

All replies

  • No, you would need to disable the scrollview when and handle all scrolling yourself, but this won't be smooth. You may want to rethink the UI layout so this isn't necessary.

    See http://blogs.msdn.com/b/wsdevsol/archive/2013/02/16/where-did-all-my-gestures-go.aspx .

    --Rob

    Monday, December 23, 2013 3:53 PM
    Moderator
  • Thanks, Rob,

    Given VerticalScrollMode to Disabled and HorizontalScrollMode is Enabled.

    In this case it is a bit sad that ScrollViewer captures vertical move (15 pixels up and down dragging, not only horizontal gestures).

    Will do scrolling myself or rethink UI.

    Tuesday, December 24, 2013 7:40 AM