Francois has released Lithium, a tree diagramming control for .NET.
Features:
- Automatic layout of the tree both horizontally and vertically.
- The standard add/delete/edit mouse actions.
- Various types of connections; the traditional rectangular connections, the default straight line, Bezier connections (popular in mind-mapping applications).
- Flexible import/export of XML data using .Net's XmlSerializer class.
- Depth First Traversal (DFT) and Breadth First Traversal (BFT) of the tree.
- The visitor pattern allows you to traverse the graph and perform actions (see the colouring example or the XML export example).
- Expand/collapse branches (sub-branches persisting in their state).
- Various hotkeys to easily edit the diagram.
- Easy to understand and, hence, easy to extend or modify architecture.
- 'seek new parent' on moving shapes or branches, i.e. on moving a sub-branch you get visual feedback about a possible new parent. If no parent is found the sub-branch will be connected back to its previous parent.
- Editing of properties via the property grid.
- Various examples are given on how to use the visitor interface.
- Random graph generation, random node addition.
- Lots of comments in the code which, in addition to this article, should make it easy to adapt the control in your own applications.
The requisite screenshot:

[via Howard van Rooijen]
Posted
04-07-2005 7:46 AM
by
Darrell Norton