C# 在 WPF 中制作图形的最佳方法是什么?(或者通常也适用于 WPF)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/545513/
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-04 07:37:10  来源:igfitidea点击:

What is the best way to make a graph in WPF? (or in general that would apply to WPF as well)

c#.netwpf

提问by Alex Baranosky

So I am making a piece of software in WPF, and I want to be able to make graphs out of the data I am storing. Just line graphs with x and y axises. Ideally I would want them to have a nice elegant simplicity to them.

所以我正在用 WPF 制作一个软件,我希望能够从我存储的数据中制作图表。只是带有 x 和 y 轴的折线图。理想情况下,我希望他们对他们有一个很好的优雅简约。

I know WPF doesn't come with graphs, and I have tried ZedGraph in a WinForms project, but I thought frankly it looked ugly.

我知道 WPF 没有图形,我在 WinForms 项目中尝试过 ZedGraph,但坦率地说,我认为它看起来很难看。

What is the best way to make simple, elegant graphs in WPF?

在 WPF 中制作简单、优雅的图形的最佳方法是什么?

采纳答案by epotter

The WPF Toolkit is available. It is free from CodePlex. It contains some nice charting classes.

WPF 工具包可用。它从 CodePlex 中免费。它包含一些不错的图表类。

It can be downloaded here. There is some commentary here.

它可以在这里下载。有一些评论在这里

回答by ShuggyCoUk

Microsoft purchased some of the IP from Dundas and supplied their winforms/asp.net charts as Microsoft Chart Controls

微软从 Dundas 购买了一些 IP,并提供了他们的 winforms/asp.net 图表作为Microsoft Chart Controls

Since they will render as images they should be integrate without too much effort.

由于它们将呈现为图像,因此应该无需太多努力就可以集成。

I have used the underlying dundas functionality and like it so would assume that these are respectable free controls.

我已经使用了底层的 dundas 功能并且喜欢它,所以会假设这些是值得尊敬的免费控件。

回答by Steven Robbins

You can get the Silverlight Chart Controls running on WPF, they're quite nice (and free).

您可以在 WPF 上运行Silverlight 图表控件,它们非常好(而且免费)。

回答by epotter

Try VisiFire. It looks good. It works well.

试试VisiFire。这看起来不错的样子。它运作良好。

enter image description here

在此处输入图片说明