Detecting node orientation


I am currently working with a TreeLayout that is rendering its nodes in either a horizontal or vertical row (see attached image for example). Each “level” of the diagram will only ever render the nodes out horizontally or vertically.

I am trying to find out if there is any way of determining the “orientation” of a node before or after the diagram has been laid out.


Did you want to know during the TreeLayout? If so, you can look at TreeVertex.Angle in overrides such as TreeLayout.AssignTreeVertexValues.

All of the TreeVertexes are kept in the TreeLayout.Network, but that network is thrown away at the end of the layout. So there’s no easy way to retrieve that information afterwards. However, you could record that information in any number of overrides, such as TreeLayout.LayoutNodes.

Thanks Walter! That worked fantastically!