All I want to know is if there's an easy way to add lines that connect nodes in a WPF TreeView, in the same manner as Visual Studio 2008's Solution Explorer pane. I found one solution but there's a lot of code and I want a simpler way. A thread on Microsoft's Silverlight forums seems to suggest that the lack of a "lines" option is due to Silverlight compatibility.
A:
That's pretty much the only way. You need to modify the ControlTemplate of the TreeView and to do so you need to meet the requirements for the TreeView to draw itself (which is all the extra code). I REALLY suggest you get used to ControlTemplates if you'll work with WPF, since it's a very powerful feature. Basically they did it this way to separate design from functionality.
Carlo
2009-10-21 21:16:29