I'm trying virtualization on the TreeView, and I have a RadTreeViewItem Style to set the IsExpanded property to true. If I set IsVirtualizing to true in the tree, the the Style does not apply, but if I set it to true, it does. Is there any way to fix this?
Do you really need to set the IsExpanded to all of the RadTreeViewItems? Actually, the UI Virtualization technique generates the visual containers (RadTreeViewItems) only when they are needed, when you need them in the viewable area. On the other hand, expanding an item also generates new containers. If you want to expand all items when the tree loads, all of the RadTreeViewItems will be generated and virtualization is needless. So you have to be clear about what you wish to achieve. Expanding all items ( when they are actually too many) makes bad performance which the virtualization wants to prevent.
You can find more info on Collapsing/Expanding items/ particular item here and more info about UI Virtualization here. Hope this helped you. Feel free to ask if you have further questions.
All the best,
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF