Detecting ScrollViewer Offset after manipulation boundary RRS feed

  • Question

  • I'm trying to detect the manipulation distance after a user has reach the top of a scrollviewer and the "compressing" feedback has started. However at this point ViewChanged and ViewChanging stop firing.

    What event can I use to judge the manipulation distance after the scrollviewer has reached the top of its content?

    Wednesday, January 14, 2015 10:51 PM

All replies

  • It is actually built into the platform. Check the HorizontalSnapPointsType and HorizontalSnapPointsAlignment properties.
    Thursday, January 15, 2015 7:23 AM
  • Unsure how you would recommended I use snap points in this context?
    Thursday, January 15, 2015 8:37 AM
  • Hiii
         You may need to check out HorizontalScrollChaining and make sure it's enabled. Also, is there a reason that you can't combine the two into one control which tracks both X and Y?. If you need virtualization, why not use a ListView? You can style it so there's no selection or highlight/hinting, and it will come with virtualization and scrolling.

    Thursday, January 15, 2015 11:38 AM
  • I'm actually already using a list view, the ScrollViewer I'm referring to is ListViews internal one.

    Let me try explain what I'm trying to achieve further -

    When scrolling my ListView as normal I can attach to the ViewChanging and ViewChanged events on the internal ScrollViewer and then can see the ScrollViewer.VerticalOffset.

    However when you have reached the top of the ScrollViewer (I only have vertical scrolling enabled) and ScrollViewer.VerticalOffset == 0 then ViewChanging and ViewChanged stops firing. This is when the "Compression" feedback is displayed to the user.

    So I want to be able to detect the user manipulation after ScrollViewer.VerticalOffset == 0 and ViewChanged event has stopped firing.


    Thursday, January 15, 2015 12:01 PM