Scroll Linking 2 Collection Views

  1. 6 years ago

    johnbhiggins

    25 Jul 2017 User since 2017

    Is there any way to link 2 or more collection views so that when one is scrolled the other is scrolled at the same time? Thanks!

  2. andrea

    25 Jul 2017 Administrator User since 2016
    Edited 6 years ago by andrea

    Hi @johnbhiggins ,
    you should be able to do this by adding the following code to the DidScroll event of the CollectionView1:

    CollectionView2.contentOffset = CollectionView1.contentOffset;

    However, there is currently a bug in the contentOffset property getter that leads to an infinite loop if used in the DidScroll event.
    This issue will be fixed in the next release, meanwhile you can use a workaround to make it work in the current release (see the attached project... I've added the avoidLoop property to the CollectionView1 and set it in the DidShow event of the Window1)

or Sign Up to reply!