DrawTree Algorithm for automatic tree layout described in this blog To run it, simply open the solution in visual studio and hit "run". This fork includes the fixes found in the comments by Carlos