I have something like this:
Synchronized scrolling of two ScrollViewers whenever any one is scrolled in wpf
The problem is that the size of the content of the Scrollviewer do not have the same width.
I have managed to calculate the proportional movement of the bars but does not take into account the size of the bars, which are different from each other:
sv2.ScrollToHorizontalOffset(e.HorizontalOffset * (sv1.Width / grid1.Width) / (sv2.Width / grid2.Width));
sv1.ScrollToHorizontalOffset(e.HorizontalOffset * (sv2.Width / grid2.Width) / (sv1.Width / grid1.Width));
It only coordinates the start of the bars, regardless of their size. Any ideas?