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

customising a wpf treeview like a tab control

1 Answer 130 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Lyjen
Top achievements
Rank 1
Lyjen asked on 29 Sep 2009, 06:57 AM

I have to customize a  WPF tree control as follows.  The children of the selected tree item should be placed to the right starting always from top, straight to the first tree item .  What are the ways to customize a TreeView like a tab?  When treeitem3 is expanded its children should be placesd as shown below.

+TreeItem1    SubLevel1ofTreeItem3
+TreeItem2    SubLevel2ofTreeItem3
-TreeItem3    SubLevel3ofTreeItem3
+TreeItem4    SubLevel4ofTreeItem3
+TreeItem5    SubLevel5ofTreeItem3

My application is already develped based on the treeview control. If I change it to a tabcontrol or menucontrol then lot of changes have to be made in application. I just want to change the style and keep the application as it is now. Please help.



1 Answer, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 29 Sep 2009, 07:10 AM
Hi Mathew Abraham,

You need to edit the RadTreeViewItem ControlTemplate and to position the Header and the ItemsPresenter to be aligned horizontally. You also check this demo as an example of modified treeview look:
http://demos.telerik.com/silverlight/#TreeView/TemplatedNodes

Greetings,
Valentin.Stoychev
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.
Tags
TreeView
Asked by
Lyjen
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Share this question
or