0

I am creating a UI rich application in C# forms (.net 4.5) for managing/displaying family tree. I tried using many already available products. But none of the free products available have the feature to display and print the complete family tree in a screen. So I have decided to write one myself.

Now I have decided to use graph for the UI and a node will be created depicting each person in the database. I am planning to parse through the complete database in the step 1 and create a logical graph. Step 2 is to display the logical graph with a rich UI. I am planning to have simple features like, when we right click on the appropriate node, we must get the option to update their information.

So my question now is, to cater the above requirement; what is the best component could be used.

Thanks in advance, S.Sudharsan

  • forget winforms. it doesn't support graphics. See my [WPF example](http://stackoverflow.com/a/15821573/643085) of something similar to what you need. `ContextMenus` and other features you mention could easily be added to that sample. – Federico Berasategui May 23 '13 at 20:21

2 Answers2

0

Graph# is an open-source C# component for displaying graphs. It requires a little bit of work because it hasn't been maintained in a long time but still very useful.

ose
  • 4,065
  • 2
  • 24
  • 40
0

I had the same problem some time ago.

The final solution was to design each graph node as a user control (so you can customize all the visual properties) and use GraphViz (in my case DOT algorithm) to calculate node positioning.

If you don't want to use any third party framework, you should do some research about graph layout (especially the Sugiyama algorithm).

guanabara
  • 590
  • 1
  • 9
  • 22
  • I do not have any constraint like not to use third party component as long as it solves my purpose. – Sudharsan Simhan May 23 '13 at 12:42
  • Did creating your own custom user control worked out well ?? In my scenario, I will be having around 150+ of such nodes getting displayed at a time on the screen. So curious to know about the performance implications on having such a heavy weight user control. – Sudharsan Simhan May 23 '13 at 12:49
  • Well, it will always depend on your implementation. In my case, the result was smooth enough.But you can keep some things in mind. - You'll hardly need to display the 150+ nodes at the same time. - Dont forget to suspend and resume layout while editing nodes. - Dispose your user controls when not in use. – guanabara May 23 '13 at 13:13