Scroll with Data Binding
Hi all
Here’s a video showing the problem we’re having:
2025-10-23 13-17-19.mp4In the video you can see the scroll animating to the clicked component’s position CORRECTLY if we don’t move the scroll by hand. This is done with data binding. So each element when clicked sets a viewmodel parameter that’s then used in the scroll percentage. This works as intended and is great.
The problem arises when we scroll by hand (effectively changing the scroll percentage to another value while not writing to the VM parameter). After a manual scroll offset if we click on any component it resets the scroll percentage to the last parameter value and then interpolates to where it’s needed. What happens is the scroll resets to the last clicked value and then animates instead of animating from where the current scroll percentage is to the new value.
I’ve tried different combinations of Data binding directionalities and wasn’t able to find a solution.
The only solution I found works without any interpolation. So imagine we click on a element and it scrolls to that element instantly, then we can scroll manually and keep updating the value with no interpolation and that’s OK, and if we then click on another component it goes there instantly.
But this is not what we’re aiming for as it’s not a smooth scroll.
How can we achieve this?
The data flow should be as follows:
When Clicking:
Component click > VM Scroll Property > Container Scroll Percentage + Interp
When Scrolling:
Container Manual Scroll Percentage - No Interp > VM Scroll Property > Container Scroll Percentage No Interp
As you can tell we’re trying to have 2 different behaviours in one container. But we can only bind in 1 way.
What are the options to achieve a smooth scroll movement when clicked even after manually offsetting the scroll?
Thank in advance
Cheers