nokola
Topic Author
Posts: 188
Joined: 10 Mar 2015, 05:29

Best way to implement rubberband (bounce) scrollviewer effect?

22 Nov 2017, 10:21

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
 
User avatar
jsantos
Site Admin
Posts: 4124
Joined: 20 Jan 2012, 17:18
Contact:

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

23 Nov 2017, 12:11

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.
 
nokola
Topic Author
Posts: 188
Joined: 10 Mar 2015, 05:29

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

23 Nov 2017, 19:51

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.
 
Phodopus
Posts: 7
Joined: 26 Nov 2021, 21:19

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

27 Nov 2023, 11:51

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?
 
User avatar
jsantos
Site Admin
Posts: 4124
Joined: 20 Jan 2012, 17:18
Contact:

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

30 Nov 2023, 13:17

Please, create a ticket about this. We want to have this officially supported.

Who is online

Users browsing this forum: Bing [Bot] and 6 guests