Hi all, I've kind of coded myself into a pickle on this one. I am writing a custom WPF control which is similar to the "TreeListView" described in This MSDN article as well as many other places on the net. A pretty big pile of this thing is custom at this point, and it's meeting my goals fairly well, except on the virtualization front. My overriden treeview and treeviewitem templates both use virtualizingstackpanels to present their items, and I've verified that all of this is getting created as expected. The virtualization works correctly on root level items (only the UI elements for those currently visible in the scrollviewer are cooked up), and the treeview stuff takes care of not generating the elements for collapsed nodes. The problem comes when expanding a node -- all the elements are cooked up for every child in the node, even the thousands that are offscreen.
It seemed to me like all I needed to do was somehow set the scrollowner property of the inner nested virtualizingstackpanels to the same main scrollview that the root level VSP gets hooked up to by default, but I read an MSFT poster here saying that this will not work.
Unfortunately this thing is slow as mud without the virtualization occurring, so I need to come up with some sort of solution. Any suggestions would be greatly appreciated.