我怎么能一个饼图添加到我的WinForms应用程序?

问题描述:

我想一个饼图添加到我的WinForms应用程序 - 但唯一的图,我可以在我的工具箱中找到的是常规的柱状图。

I am trying to add a pie chart to my winforms application - but the only chart I can find in my toolbox is the regular bar chart.

有什么办法,形成这个柱状图为饼图或通过使用一些现有的.NET 4框架库添加一个饼图部件到我的工具箱(无需安装任何新的资料库,如DevEx preSS等等)?

Is there any way to form this bar chart as a pie chart or add a pie-chart component to my toolbox by using some existing .net 4 framework libraries (without installing any new libraries such as "DevExpress" etc)?

如果没有第三方工具解决它的唯一办法是,为您创造一个WPF新的用户控件本以下这个教程:

Without third party tools the only way around it would be for you to create a new user control in WPF for this following this tutorial:

http://www.$c$cproject.com/Articles/28098/A-WPF-Pie-Chart-with-Data-Binding-Support

再举办这种Windows窗体项目中,下面这个教程:

And then hosting this within the windows form project, following this tutorial:

HTTP://www.switchonthecode.com /教程/ WPF的教程使用-WPF合的WinForms

您已经创建了自己的控制,而无需下载任何东西的必要,虽然你可能需要的上下文切换使用WPF教程这样 - 我希望这是确定:)

That way you have created the control yourself without the need of downloading anything, although you may need to context switch to use the WPF tutorial - I hope this is ok :)