Page 1 of 1

Best way to implement rubberband (bounce) scrollviewer effect?

Posted: 22 Nov 2017, 10:21
by nokola
Trying to implement a scroll effect like this (WP): https://www.youtube.com/watch?v=ymtCIwi42Zk
Once you scroll to the top, and keep dragging, the ScrollViewer scales to be "squished" and snaps back once you release your finger.
iOS has similar behavior, except for no squishing.

What is the best way to implement this?
1. Subscribe to "scrollchanged" handler, then check touch position and "squish" with ScaleTransform until finger lifted?
OR
2. Inherit from ScrollViewer and do something else?
OR
3. Wait for native support in Noesis? (if planned)

Thanks!
Edit: found this source that has a nice algorithm for spring scroll (for XNA) https://github.com/DigitalRune/DigitalR ... r.cs#L1029

Re: Best way to implement rubberband (bounce) scrollviewer effect?

Posted: 23 Nov 2017, 12:11
by jsantos
1) seems to be the best option to me.

Regarding 3) we have plans to implement ReportBoundaryFeedback. With that event everything would be easier for you I assume.

Re: Best way to implement rubberband (bounce) scrollviewer effect?

Posted: 23 Nov 2017, 19:51
by nokola
Good to know, thanks! I'll try #1for now (with global event handler and VisualTreeHelper.HitTest(..) similar to how I did the TiltEffect) and eventually move to #3.

Re: Best way to implement rubberband (bounce) scrollviewer effect?

Posted: 27 Nov 2023, 11:51
by Phodopus
Has anyone managed to implement an iOS-like bounce effect for the ScrollViewer in Noesis? Are there still plans to implement the ReportBoundaryFeedback event or even make this rubberban/bounce effect a native feature of Noesis?

Re: Best way to implement rubberband (bounce) scrollviewer effect?

Posted: 30 Nov 2023, 13:17
by jsantos
Please, create a ticket about this. We want to have this officially supported.