Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Custom Scrolling In a CustomVrtualizingTreePanel

$
0
0

Hello WPF experts!

I am wroking on few custom controls. One of them is a Panel called "CustomVirtualizingTreePanel" another is the "Tree" that is an ItemsControl with its ItemsContainers called "TreeItem". Basically the panel is there to support UI Virtualization for the Tree. The Tree itself has set the CustomVirtualizingTreePanel as its ItemsPanel and the containers called "TreeItem" also have set the CustomVirtualizingTreePanel as their ItemsPanel.

Now the problem is to make the root CustomVirtualizingTreePanel support the scrolling. I have implemented the IScrollInfo interface but I dont know how to even start programming the scrolling logic.

I managed to implement the "expanding nodes behavior" for the TreeItem and also the "generate only the visible items no matter on what level behavior" for the CustomVirtualizingTreePanel but now I am stuck at making the CustomVirtualizingTreePanel scroll. The major issue is to let the panel know what level has what offset. Thats where I was hoping somebody could help me out with ideas how it could work. The root CustomVirtualizingTreePanel  increases the offset if I start scrolling down and now I need some algorithm to inform other nested CustomVirtualizingTreePanels to recalculate their offset according to the main offset from the root. How do I do that? Any ideas?






Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>