Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 C#4.0 C#3.5 graphics , +
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 14-Jun-12 12:14pm
Edited 14-Jun-12 21:57pm
Nikfazan11.5K
v2
Comments
SAKryukov at 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 at 14-Jun-12 23:46pm
   
i mean windows form
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Comments
losmac at 14-Jun-12 18:07pm
   
Good answer, my 5!
 
Wow, you have reached 400K points - Congratulations!
SAKryukov at 14-Jun-12 18:14pm
   
Thank you very much, Maciej.
--SA
Espen Harlinn at 14-Jun-12 18:30pm
   
5'ed!
SAKryukov at 14-Jun-12 18:44pm
   
Thank you, Espen.
--SA
VJ Reddy at 14-Jun-12 19:58pm
   
Nice answer. 5!
SAKryukov at 14-Jun-12 20:36pm
   
Thank you, VJ.
--SA
Abhinav S at 15-Jun-12 2:36am
   
5!
SAKryukov at 15-Jun-12 11:21am
   
Thank you, Abhinav.
--SA
Manas Bhardwaj at 15-Jun-12 3:45am
   
Correct +5
SAKryukov at 15-Jun-12 11:21am
   
Thank you, Manas.
--SA
Sergey Alexandrovich Kryukov at 12-Oct-12 11:51am
   
Thank you.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Most likely you can use the Graph# library[^].
 
Best regards
Espen Harlinn
  Permalink  
Comments
VJ Reddy at 14-Jun-12 19:57pm
   
Good reference. 5!
Espen Harlinn at 14-Jun-12 20:02pm
   
Thank you VJ, it's a fairly useful library :-D
VJ Reddy at 14-Jun-12 20:11pm
   
You are absolutely correct. As seen from the above reference it is elaborate with several options.
 
Thank you :)
SAKryukov at 14-Jun-12 20:37pm
   
Looks like a good one, a 5.
--SA
Espen Harlinn at 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
Abhinav S at 15-Jun-12 2:36am
   
5 of course.
Espen Harlinn at 15-Jun-12 2:49am
   
Thank you, Abhinav!
Manas Bhardwaj at 15-Jun-12 3:45am
   
to the point +5!
losmac at 15-Jun-12 4:06am
   
Good answer, my 5!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
v2
Comments
Espen Harlinn at 14-Jun-12 20:28pm
   
5'ed - nice article :-D
VJ Reddy at 14-Jun-12 20:31pm
   
Thank you, Espen :)
SAKryukov at 14-Jun-12 20:37pm
   
The one to the point, a 5.
--SA
VJ Reddy at 14-Jun-12 20:46pm
   
Thank you, SA :)
Abhinav S at 15-Jun-12 2:36am
   
Correct. 5.
VJ Reddy at 15-Jun-12 7:35am
   
Thank you, Abhinav :)
Manas Bhardwaj at 15-Jun-12 3:46am
   
Correct +5
VJ Reddy at 15-Jun-12 7:35am
   
Thank you, Manas :)
losmac at 15-Jun-12 4:06am
   
Good answer, my 5!
VJ Reddy at 15-Jun-12 7:35am
   
Thank you, losmac :)
Espen Harlinn at 23-Jun-12 4:08am
   
Nice link :-D
VJ Reddy at 23-Jun-12 8:10am
   
Thank you, Espen :)

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

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 OriginalGriff 120
3 PIEBALDconsult 110
4 Zoltán Zörgő 99
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 15 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100