Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
Hi there,
Hhow can i simply draw a graph like this http://en.wikipedia.org/wiki/File:Binary_tree.svg in c#.

Do you know any component or something that help me to do it quickly?

Please offer the open source component and something that has very clear tutorial?

Thanks
Posted
Updated 14-Jun-12 20:57pm
v2
Comments
Sergey Alexandrovich Kryukov 14-Jun-12 17:46pm    
What do you mean by "C#" and "graphics"? It can be System.Drawing with System.Windows.Forms or WPF...
--SA
Hussein399 14-Jun-12 23:46pm    
i mean windows form

Please see my comment to the question. You need to specify your application type or UI library you want to use. If you don't have preference, you should tell us about it, as "what would you advise".

Now, very clear tutorial is — on what topic? Don't expect and look for tutorials on drawing graphs, look for tutorials/documentation on graphics, perhaps interactive graphics. But there are a lot articles on these topics. I'm preparing an article on one of the topics, but it will take some more time. In the meanwhile, my overview will give you an idea on what's involved:

Connect different controls[^],
Vector graphics software like CorelDraw or Inkscape in C# or VB.NET[^].

—SA
 
Share this answer
 
Comments
Maciej Los 14-Jun-12 18:07pm    
Good answer, my 5!

Wow, you have reached 400K points - Congratulations!
Sergey Alexandrovich Kryukov 14-Jun-12 18:14pm    
Thank you very much, Maciej.
--SA
Espen Harlinn 14-Jun-12 18:30pm    
5'ed!
Sergey Alexandrovich Kryukov 14-Jun-12 18:44pm    
Thank you, Espen.
--SA
VJ Reddy 14-Jun-12 19:58pm    
Nice answer. 5!
Most likely you can use the Graph# library[^].

Best regards
Espen Harlinn
 
Share this answer
 
Comments
VJ Reddy 14-Jun-12 19:57pm    
Good reference. 5!
Espen Harlinn 14-Jun-12 20:02pm    
Thank you VJ, it's a fairly useful library :-D
VJ Reddy 14-Jun-12 20:11pm    
You are absolutely correct. As seen from the above reference it is elaborate with several options.

Thank you :)
Sergey Alexandrovich Kryukov 14-Jun-12 20:37pm    
Looks like a good one, a 5.
--SA
Espen Harlinn 14-Jun-12 20:41pm    
Thanks you, Sergey - It's what I use together with quickgraph:http://quickgraph.codeplex.com/
when I need something related to graphs in .Net
Please see this CodeProject article Graphical BinaryTrees[^]

In this article it is written that "This article is about binary trees. A Binary Tree contains unlimited number of nodes, the nodes can be removed, added, searched, etc. Here we will discuss on how to make a binary tree on c# code, and how to draw that on bitmap using GDI+."

I think it may also be helpful for the above purpose.
 
Share this answer
 
v2
Comments
Espen Harlinn 14-Jun-12 20:28pm    
5'ed - nice article :-D
VJ Reddy 14-Jun-12 20:31pm    
Thank you, Espen :)
Sergey Alexandrovich Kryukov 14-Jun-12 20:37pm    
The one to the point, a 5.
--SA
VJ Reddy 14-Jun-12 20:46pm    
Thank you, SA :)
Abhinav S 15-Jun-12 2:36am    
Correct. 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900