I have two datagrids. Vertical scrollbar of first datagrid is hidden. Required scenario is that I want to make the first datagrid scroll its content whenever the second datagrid is scrolled. User cannot scroll the first datagrid manually but whenever the second datagrid is scrolled, the first datagrid should move in parallel with it.
I tried to change the value of vertical scrollbar of first datagrid as the value of second datagrid's vertical scrollbar changes but this simply changes the position of the scrollbar but does not scroll the content of the datagrid.
How to synchronize the scroll bar of first datagrid with the second one? It should look like as if both are a part of same UI element and thus scrollbar should ideally scroll both.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…