Synchronize Listview Scrollbars

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?YW5kaSByaWNrZW5iYWNo?=

    Synchronize Listview Scrollbars

    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.
  • sreeraj r

    #2
    re : Synchronize Listview Scrollbars - andirickenbac

    You can use 'ScrollToVertic alOffset' method(in wpf Scroll Viewer).
    Believe the following code snippet will help you

    private void ScrollViewer1_S crollChanged(ob ject sender, ScrollChangedEv entArgs e)
    {
    ScrollViewer2.S crollToVertical Offset(e.Vertic alOffset);

    }



    Happy Coding
    Sree

    Comment

    Working...