Click here to Skip to main content
12,062,966 members (31,704 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#3.0 C# 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
Nikfazan14.1K
v2
Comments
SAKryukov 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
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 14-Jun-12 18:07pm
   
Good answer, my 5!

Wow, you have reached 400K points - Congratulations!
SAKryukov 14-Jun-12 18:14pm
   
Thank you very much, Maciej.
--SA
Espen Harlinn 14-Jun-12 18:30pm
   
5'ed!
SAKryukov 14-Jun-12 18:44pm
   
Thank you, Espen.
--SA
VJ Reddy 14-Jun-12 19:58pm
   
Nice answer. 5!
SAKryukov 14-Jun-12 20:36pm
   
Thank you, VJ.
--SA
Abhinav S 15-Jun-12 2:36am
   
5!
SAKryukov 15-Jun-12 11:21am
   
Thank you, Abhinav.
--SA
Manas Bhardwaj 15-Jun-12 3:45am
   
Correct +5
SAKryukov 15-Jun-12 11:21am
   
Thank you, Manas.
--SA
Sergey Alexandrovich Kryukov 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 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 :)
SAKryukov 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
Abhinav S 15-Jun-12 2:36am
   
5 of course.
Espen Harlinn 15-Jun-12 2:49am
   
Thank you, Abhinav!
Manas Bhardwaj 15-Jun-12 3:45am
   
to the point +5!
losmac 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 14-Jun-12 20:28pm
   
5'ed - nice article :-D
VJ Reddy 14-Jun-12 20:31pm
   
Thank you, Espen :)
SAKryukov 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.
VJ Reddy 15-Jun-12 7:35am
   
Thank you, Abhinav :)
Manas Bhardwaj 15-Jun-12 3:46am
   
Correct +5
VJ Reddy 15-Jun-12 7:35am
   
Thank you, Manas :)
losmac 15-Jun-12 4:06am
   
Good answer, my 5!
VJ Reddy 15-Jun-12 7:35am
   
Thank you, losmac :)
Espen Harlinn 23-Jun-12 4:08am
   
Nice link :-D
VJ Reddy 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web03 | 2.8.160204.4 | Last Updated 15 Jun 2012
Copyright © CodeProject, 1999-2016
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