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

Customizing Style of the Scrollbar

5 Answers 131 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Glenn
Top achievements
Rank 1
Glenn asked on 21 Apr 2010, 01:22 PM
I have customized the style of the ScrollViewer and would like the style of the TreeView scrollbar to match.  Can anyone point to documentation how how to accomplish this?

I have read this post: A quick way to style the scrollbar and apparently there is not an easy way to do it. 

Thanks,
Glenn

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 23 Apr 2010, 01:53 PM
Hi Glenn,

In order to change the style of the ScrollView in the RadTreeView you have to edit the control template of the RadTreeView control in  Blend. For more information you can follow the link below:

http://www.telerik.com/help/silverlight/radcontrols-for-silverlight-expression-blend-support.html 

After you edit the control template you have to set your style to the ScrollView control in the RadTreeView.

If you have further questions please do not hesitate to ask us.
I hope this will help you.

Greetings,
Dimitrina
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
Glenn
Top achievements
Rank 1
answered on 26 Apr 2010, 05:21 PM
Thanks Dimitrina.

I actually found an easier way.  Since I already spent the time creating a template for the ScrollViewer, I simply wrapped a ScrollViewer around the RadTreeView.  The only minor issue I haven't resolved is making the RadTreeView width expand when additional child nodes are added.

Thanks,
Glenn

0
Tina Stancheva
Telerik team
answered on 29 Apr 2010, 02:34 PM
Hello Glenn,

I am not sure if I understand your scenario correctly. Can you please elaborate on it. Do you set a value to the Width property of the RadTreeView and want to change it afterwords when a new item is added?

If this is the case then the expected behavior of the RadTreeView is to add a HorizontalScrollViewer to the TreeView. However, if your scenario requires a different behavior, can you please describe it so that we can further assist you in implementing it.

If no value is set to the Width property of the RadTreeView, then adding a new child node will increase the width of the TreeView if more space is needed to display the new item properly.

Also, please keep in mind that the width of the RadTreeView changes/the HorizontalScrollViewer appears only if there isn't enough available space for the items to be properly displayed. Therefore, if the new added item is added to a collapsed item, the TreeView width won't change/ScrollViewer won't appear until the item is expanded.


Kind regards,
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
Glenn
Top achievements
Rank 1
answered on 30 Apr 2010, 01:14 PM

Hi Tina:

That was precisely what I was trying to do.  I simply removed the Width attribute from the RadTreeView as you suggested and now, as children nodes are displayed, the tree view width expands and my ScrollView with a custom template takes over.

Thanks for your help!
Glenn




0
Accepted
Tina Stancheva
Telerik team
answered on 05 May 2010, 08:32 AM
Hello Glenn,

I am glad I was able to help.

Please let us know if we can further assist you.

Greetings,
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.
Tags
TreeView
Asked by
Glenn
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Glenn
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or