Okay what I want to do is something like this.
|--> Child 1 (Parent=Root 2)
|
| Child 2.0 (Parent=Child 2)
| Child 2.1 (Parent=Child 2)
|--> Child 2 (Parent=Root 2) -------> Child 2.2 (Parent=Child 2)
| Child 2.3 (Parent=Child 2)
| Child 2.4 (Parent=Child 2)
| Child 2.5 (Parent=Child 2)
|
|--> Child 3 (Parent=Root 2)
Root ------- Root 2 -----> Child 4 (Parent=Root 2) -----> Root 3 ------> Root 4
|--> Child 5 (Parent=Root 2)
|
| Child 2.0 (Parent=Child 6)
| Child 2.1 (Parent=Child 6)
|--> Child 6 (Parent=Root 2) ------> Child 2.2 (Parent=Child 6)
| Child 2.3 (Parent=Child 2)
| Child 2.4 (Parent=Child 2)
|
|--> Child 7 (Parent=Root 2)
Basically each Root element is Horizontal so I am using a VirtualizingStackPanel with Orientation Horizontal. Which is exactly what I want right now. Now the problem I have is the children. I basically want the Children to operate to the right of the Root 2 Element who is the parent node of the children.
I am simulating a Tree that is actually Horizontal instead of a Vertical tree.
If I understood your question correctly then you want something like this?
I added a 1px black border around each TreeViewItem to see what went where so that part can be removed.
I can’t think of any other solution then to re-template TreeViewItem for this. First I used a Horizontal VirtualizingStackPanel like you did. Then I removed the RowDefinitions and added another ColumnDefinition in the TreeViewItem template. To get matching Widths for the Columns I used IsSharedSizeScope for the Middle Column.
Here’s the Xaml