C# WinForms 的免费或开源图表组件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2005274/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 22:34:38  来源:igfitidea点击:

Free or Open Source Diagramming Component for WinForms

c#wpfwinformsgraphicsdiagramming

提问by Winston Smith

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).

我正在使用 WinForms 和 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.

编辑:但是,由于它将是一个内部工具,如果在该领域有任何建议,我可能可以使用 3.5 SP1 和 WPF。

Must be free or open source.

必须是免费的或开源的。

Any recommendations?

有什么建议吗?

采纳答案by AlexS

You might want to take a look at GraphVizwhich 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).

您可能想看看在CPL 下分发的GraphViz(即免费)。它并不完全适用于 .NET/WinForms,但无论如何都可能有用。该库的主要目的是可视化图形(依赖图实际上是一个 [方向] 图)。您可以使用它来获取图像(图形布局)或点数组(您项目的坐标)。

回答by Aviad P.

Did you try the CodeProject article series by Sukram:

您是否尝试过 Sukram 的 CodeProject 文章系列:

WPF Diagram Designer

WPF 图表设计器

回答by Lukas ?alkauskas

Here is some references which might be interesting for you:

以下是您可能感兴趣的一些参考资料:

Diagrams.NET

图表.NET

Diagram.NETis 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.

Diagram.NET是一个完全用 C# 编写的免费开源图表工具。将Diagram.NET WinForm Control 放入您的表单中,就像Microsoft Visio? 一样,用户可以绘制形状和链接。通过一些代码,您可以控制、更改、添加和删除这些元素。

Microsoft Chart Controls

微软图表控件

The samples environment for Microsoft Chart Controls for .NET Frameworkcontains 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.

Microsoft Chart Controls for .NET Framework 的示例环境包含 200 多个 ASP.NET 和Windows 窗体示例。这些示例涵盖了 .NET Framework 图表控件中的每个主要功能。它们使您能够查看运行中的 Chart 控件,并将代码用作您自己的 Web 和 Windows 应用程序的模板。

回答by Kit Fisto

Too late for the questioner but perhaps interesting for researchers:

对于提问者来说为时已晚,但对研究人员来说可能很有趣:

NShape

形状

NShapeis 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.

NShape是一个用于 .NET WinForms 的开源图表设计框架。软件开发人员使用 NShape 将图表功能集成到他们的应用程序中。使用 NShape,应用程序让用户可以查看、注释、修改和创建图表,如流程图、布线方案或项目图表。NShape 是开源的,并拥有双重许可,允许在开源项目中免费使用,在商业项目中收取许可费。

回答by Jaye

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

这是从 GridWizard/Github呈现为HTML5(您可以轻松扩展到 Visio)的一个源代码:https : //github.com/gridwizard/SimpleFlowDiagram Wordpress 文档: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)

缺点是,您需要一个查看器来显示 HTML5。或者,SimpleFlowDiagramLib已经计算了 Node.x 和 Node.y- 您可以自己将其渲染到Winform/WPF(但随后您需要自己编写代码渲染)

回答by Abhijeet Nagre

OpenDiagram

打开图

Open Diagramis 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.

Open Diagram是适用于 .Net 框架 winforms 环境的权威开源 .net 图表组件库。

使用 Open Diagram 将交互式数据可视化添加到您的 .net 应用程序中。

I have tried it with WinForms, works very well.

我已经用 WinForms 试过了,效果很好。

回答by smwikipedia

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

我和你有类似的要求。这是绘制图表的一种开源解决方案。它来自 Microsoft 和用 C# 编写的示例。

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

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