WPF based treeview with Hierarchy with Virtualization

264 views Asked by At

I've following requirement while designing UI for application. We have hierarchy as shown below

  • Level1

    • Level2.1

      • Level3
        • 1000Thumbnails..... (inside Wrap Panel which is inside ListBox)
    • Level2.2

      • Level3
        • 1000Thumbnails..... (inside Wrap Panel which is inside ListBox)

We would like to enable virtualization for thumbnails as amount of controls can go beyond 1000. Following is the output of the application

However, for virtualization to work, we need to restrict the size of ListBox within TreeView. With this limitation we end up having two scroll bars as shown in the image above.

Is there anyway we can avoid scroll viewer in ListBox but still have virtualization and scrolling (using mouse) thumbnails possible using ScrollViewer of TreeView control?

Kindly let me know if you need more information.

Thanks in advance for help!

1

There are 1 answers

1
Simon D. On

You could just hide the Scrollbar, as described in this nice article.