Yes, you are right. The parent RadTreeViewItem forms a gap when Visibility property of its child is changed.
There are several ways to work around the issue and accomplish fluid UI when changing the Visibility property of the RadTreeViewItem:
1. Change the ItemsPanel property of the RadTreeViewItem via style. This will result in proper resizing of the parent tree view item. But this will disable the implemented virtualization in the default item panel (TreeViewPanel). Meaning that virtualization of the tree will not work. This approach is applicable if you won't need the virtualization and your tree view is relatively small.
2. Change the underling data collection itself instead manipulating the Visibility property of the RadTreeViewitem. In this scenario you will need to use data binding and remove/add elements in the data source. This approach is applicable when you have relatively big tree (also consider using virtualization and load on demand).
I'm attaching a sample project demonstrating both approaches. You can take a look at the MainPage files and play around with commented code fragments. I hope this info will help you solve the issue you are experiencing. If you require more info don't hesitate to contact us.
All the best,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items