Naveenkumar R
Naveenkumar R

Reputation: 99

TreeView with Customized Style WPF

I have a requirement in that i need to display items of treeview in a below specified pattern. Here i have a treeview with three levels. I need custom style for all three levels. Could you please help me...Expected treeview

Upvotes: 1

Views: 2557

Answers (2)

Rajiv
Rajiv

Reputation: 1456

From the image you posted, it looks pretty straight forward. You can just have your own HierarchicalDataTemplate and DataTemplate for your nodes. Take a look at example here.

However if you want a great control on node's layout and behaviour then creating a custom ControlTemplate for the TreeViewItem is your best bet. There are many nice articles over internet. May be you can follow this one here.

Upvotes: 1

user3519506
user3519506

Reputation: 135

You can create a custom style for TreeViewItems and TreeView, this would give you the ability to design your own UI for the control.

The link below shows what controls you would need to style.

https://msdn.microsoft.com/en-us/library/ms752048(v=vs.110).aspx

Upvotes: 1

Related Questions