This is a migrated thread and some comments may be shown as answers.

TreeViewPanel.IsVirtualizing and ScrollBar problem

3 Answers 62 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Lauren Nickerson
Top achievements
Rank 1
Lauren Nickerson asked on 17 Aug 2010, 12:25 AM
Well basically, I'm virtualizing the RadTreeView and I get a problem with the scroll bar where it gets smaller as I scroll down. Isn't there a way where it already knows what size it should be and just use that size from the start? That's how the native WPF TreeView works.

This is what I'm talking about:

http://www.screencast.com/users/CarloToribio/folders/Jing/media/97917e36-82fd-469a-8fb5-379767fa5974

Thanks.

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 19 Aug 2010, 05:28 PM
Hi Lauren Nickerson,

Since the virtualization of both the RadTreeView and the native TreeView lies on the same principles, the behavior of the ScrollViewer in the case you described is the same in both controls. Also it is an expected behavior and as far as I know you cannot workaround it.

I also attached a project containing both RadTreeView and TreeView in order to compare their behavior when virtualized. Can you take a look at it and let me know if I missing something.

Thank you in advance.

All the best,
Tina Stancheva
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
0
Andrew
Top achievements
Rank 1
answered on 14 May 2018, 02:17 PM

Hello,

 

I know this is an old post but I am running into similar issues today. It seems like the RadTreeView's virtualization doesn't handle the vertical size of the scrollbar until it has scrolled and seen each item.

I tried running the old above example and the issue was present in that example as well. I attached 2 screen shots from that demo demonstrating the issue.

 

Thanks,

Andrew

0
Martin Ivanov
Telerik team
answered on 17 May 2018, 08:31 AM
Hello Andrew,

This behavior comes by design - initially the scrollviewer will respect only the currently loaded viewport. When you scroll down the scrollbar range will increase. Currently, this behavior cannot be altered. 

A possible approach that you could try is to implement the scrolling manually using a ScrollBar or a ScrollViewer control placed outside of the RadTreeView control and sync it with the treeview based on its ScrollViewer and the expanded items count.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
TreeView
Asked by
Lauren Nickerson
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Andrew
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or