1
votes

I have a question regarding the use of a WPF TreeView control. I have n levels of hiearchical tree nodes and want to display them in a TreeView control, but with a somewhat "unusual" visualization. Let's say these are my nodes:

Level1Item1
   Level2Item1
      Level3Item1
      Level3Item2
   Level2Item2
      Level3Item3
      Level3Item4
   Level2Item3
Level1Item2
   Level2Item4
   Level2Item5
   Level2Item6
Level1Item3
   Level2Item7
   Level2Item8
   Level2Item9

Now instead of showing them like above, I'd like to display each level as a row of buttons, where only the child nodes of the selected parent node are to be visible, for example:

[Level1Item1] Level1Item2 Level1Item3
Level2Item1 [Level2Item2] Level2Item3
Level3Item3 Level3Item4

Where the items in square brackets are the selected nodes.

Can the standard wpf TreeView control by styled somehow so that this will be possible?

Thanks!

1

1 Answers

0
votes

The WPF TreeView control can be styled anyway you like. The best way to start is to open your project in Expression Blend, and start customising the standard item templates within the TreeView control template. It is very straightforward, but you need to understand how to use expression blend in order to do it efficiently via the proper tool.