Synchronize Listview Scrollbars

  • Thread starter Thread starter andi rickenbach
  • Start date Start date
A

andi rickenbach

Hello,

i have two listviews next to each other on a form. I would like to
synchronize both vertical scrollbars of the two listviews with one scrollbar
(for example VScrollBar). How can I do that?

Thank you very much.
 
You can use 'ScrollToVerticalOffset' method(in wpf Scroll Viewer).
Believe the following code snippet will help you

private void ScrollViewer1_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
ScrollViewer2.ScrollToVerticalOffset(e.VerticalOffset);

}



Happy Coding
Sree
 
Back
Top