Free or Open Source Diagramming Component for WinForms [closed]
Asked Answered
M

8

17

I need to be able to generate dependency diagrams programmatically. I'd like it to be able to generate a bunch of boxes with labels and connectors linking them, and ideally the component would position them automatically onto a design surface which could then be manually rearranged.

I'm using WinForms and C# 2.0 (VS2005).

EDIT: However, since it'll be an internal tool, I can probably use 3.5 SP1 and WPF if there any suggestions in that arena.

Must be free or open source.

Any recommendations?

Marbling answered 5/1, 2010 at 10:10 Comment(0)
P
4

You might want to take a look at GraphViz which is being distributed under CPL (i.e. free of charge). It is not exactly for .NET/WinForms but can be useful anyway. The library's main purpose is to visualize graphs (and dependency diagram is effectively a [directional] graph). You can use it to either get an image (graph layout) or an array of points (coordinates for you items).

Preceptor answered 5/1, 2010 at 10:52 Comment(3)
Interesting. I guess I could write some code which transforms my own input to whatever format GraphViz takes and run it against that. Worth investigating - might be better than reinventing the wheel.Marbling
Thanks for this, it's working well although the diagrams are large and are going to be hard to format for printing. It would be good if I could do a little manual adjustment - do you know of a way? I wonder if I render as SVG can I import into Visio?Marbling
Unfortunately I have not tried any of this (was not in need) so I cannot help you here.Preceptor
S
12

Too late for the questioner but perhaps interesting for researchers:

NShape

NShape is an Open Source diagram designing framework for .NET WinForms. Software developers use NShape to integrate diagramming capabilities into their applications. Using NShape, applications let users view, annotate, modify and create diagrams like flow charts, wiring schemes or project charts. NShape is open source and has a dual license which allows it to be employed for free in open source projects and for a license fee in commercial projects.

Schroder answered 16/1, 2012 at 9:14 Comment(0)
C
10

Did you try the CodeProject article series by Sukram:

WPF Diagram Designer

Cephalopod answered 5/1, 2010 at 10:49 Comment(2)
WPF is not Windows FormAgain
True, but the original poster said "I can probably use 3.5 SP1 and WPF if there any suggestions in that arena."Cephalopod
M
6

Here is some references which might be interesting for you:

Diagram.NET

Diagram.NET is a free open-source diagramming tools written entirely in C#. Put Diagram.NET WinForm Control into your form and, like Microsoft Visio®, the user can draw shapes and links. With some code you can control, change, add and delete these elements.

Microsoft Chart Controls

The samples environment for Microsoft Chart Controls for .NET Framework contains over 200 samples for both ASP.NET and Windows Forms. The samples cover every major feature in Chart Controls for .NET Framework. They enable you to see the Chart controls in action as well as use the code as templates for your own web and windows applications.

Myrtlemyrvyn answered 5/1, 2010 at 11:24 Comment(0)
P
4

You might want to take a look at GraphViz which is being distributed under CPL (i.e. free of charge). It is not exactly for .NET/WinForms but can be useful anyway. The library's main purpose is to visualize graphs (and dependency diagram is effectively a [directional] graph). You can use it to either get an image (graph layout) or an array of points (coordinates for you items).

Preceptor answered 5/1, 2010 at 10:52 Comment(3)
Interesting. I guess I could write some code which transforms my own input to whatever format GraphViz takes and run it against that. Worth investigating - might be better than reinventing the wheel.Marbling
Thanks for this, it's working well although the diagrams are large and are going to be hard to format for printing. It would be good if I could do a little manual adjustment - do you know of a way? I wonder if I render as SVG can I import into Visio?Marbling
Unfortunately I have not tried any of this (was not in need) so I cannot help you here.Preceptor
H
3

OpenDiagram

Open Diagram is the definitive open source .net diagramming component library for the .Net framework winforms environment.

Use Open Diagram to add interactive data visualizations to your .net applications.

I have tried it with WinForms, works very well.

Haiti answered 11/9, 2015 at 20:50 Comment(0)
G
3

I have similar request as yours. Here's one open source solution for drawing diagrams. It's from Microsoft and samples written in C#.

https://github.com/Microsoft/automatic-graph-layout

Goldbrick answered 25/7, 2017 at 6:28 Comment(0)
D
0

Here's one that renders to HTML5 (You can easily extend to Visio) from GridWizard/Github Source code: https://github.com/gridwizard/SimpleFlowDiagram Wordpress doc: https://gridwizard.wordpress.com/2015/03/25/simple-c-library-to-render-graph-to-flowchart/

Downside is, you need a viewer to display HTML5. Alternatively, SimpleFlowDiagramLib already calculate Node.x and Node.y - you can render it to Winform/WPF yourself (but then you need to code rendering yourself)

Doornail answered 25/3, 2015 at 3:30 Comment(0)
M
-2

Vote for NShape. More or less it's fine.

Manx answered 17/6, 2021 at 21:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.