I am looking for a way to draw dotted lines to connect nodes in a wpf TreeView. The problem seems to be that i am using HierarchicalDataTemplate instead of populating the TreeView with TreeViewItems.
I have found this post:
http://social.msdn.microsoft.com/forums/en-US/wpf/thread/30cb182c-9419-40bd-946e-87971515fb95/
Witch solves it great in the case when populating it TreeViewItems but my question is, how would i solve it with HierarchicalDataTemplate?
My template look something like this:
<HierarchicalDataTemplate DataType = "{x:Type Team}" ItemsSource ="{Binding Path=Players">
<TextBlock Text="{Binding Path=Name}" />
</HierarchicalDataTemplate>
<DataTemplate DataType = "{x:Type Player}">
<TextBlock Text="{Binding Path=Name}" />
</DataTemplate >
Any solution or good hints on how to solve the problem?
The easiest ways, in my opinion, was to add the code in the itemstyle