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

How to use a slider to control the scale of items in a tree

4 Answers 87 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Timothy Garton
Top achievements
Rank 1
Timothy Garton asked on 20 Jan 2010, 08:43 PM
I am trying to implement a zoom function for a templated RadTree, and would like to tie the scale to a slider.  However I do not want to set the ScaleX/ScaleY values on the RadTree itself, as this does not achieve the desired results.  Setting the scale on the RadTree itself causes the entire control to shrink, I just want the items in the tree to shrink/grow while the RadTree itself continues to take up the entire screen.  I did find that using template binding I could set the Render Transform for the ItemPresenter in a radtree template to the same RenderTransform of the RadTree, and this did shrink the items correctly, but obviously, it also shrank the RadTree control.

I did try making a ScaleTransform resource and setting its ScaleX/ScaleY values to the vlaue of a slider, but this caused invalid XAML, as if you can't do element binding to the scaleX/ScaleY.  I'm sure there is a simple solution to this, but how can I set the scale of the ItemPresenter without having to set the RenderTransform of the RadTree and still have it tied to a slider control?  Any Examples would be great!

Thanks,
Michael

4 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 26 Jan 2010, 02:07 PM
Hi Michael,

Thank you for contacting us.

We found your case very interesting and we would like to implement an example for. Please track this thread - we will write again soon.
 
Kind regards,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Timothy Garton
Top achievements
Rank 1
answered on 02 Feb 2010, 08:13 PM
Just wanted to check back on the progress for this issue.  Also thought some images might help.  These tree1 and 2 images show the desktop application that we use and shows how its scale function works.  This is the same type of functionality I'm looking for in the Silverlight tree view.

The SilverlightTree1 and 2 images show the functionality of setting the scale transform on the RadTree itself, which is not correct.

Thanks,
Michael
0
Accepted
Ivan
Telerik team
answered on 06 Feb 2010, 09:32 PM
Hello Michael,

We sorry for the late response.

In order to zoom in and zoom out the tree control we are recommending to use our LayoutTransformControl. In the attached example we are binding its LayoutTransform property and this way scaling the tree items.

Please try the attached example and let us know if we can assist you.

All the best,
Ivan
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Timothy Garton
Top achievements
Rank 1
answered on 10 Feb 2010, 08:28 PM
That did it.  I knew the solution would be simple when I saw it, but I can say I never would have figured it out on my own.

Thanks for your help,
Michael
Tags
TreeView
Asked by
Timothy Garton
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Timothy Garton
Top achievements
Rank 1
Share this question
or