图表工具是灰色的在Visual Studio图表、灰色、工具、Studio

2023-09-03 04:15:18 作者:那些荒废了的流年“

我想要一个图表添加到我的Visual Studio的形式,但按钮是灰色的。我使用的.NET Framework 3.5和C#。继网上说明我已经下载并安装了这个链接的dll文件:的 http://www.microsoft.com/en-us/download/details.aspx?id=14422 我还添加了他们作为参考,并添加以下行我的表单文件的顶部:

I'm trying to add a chart to my Visual Studio form but the button is greyed out. I'm using .NET Framework 3.5 and C#. Following instructions online I've downloaded and installed the dll files from this link: http://www.microsoft.com/en-us/download/details.aspx?id=14422 I also added them as references and added the following line at the top of my form file:

使用System.Windows.Forms.DataVisualization.Charting;

但按钮仍是灰色的。

什么我错过了?

推荐答案

为了可以对图表控件,您需要:

To make the chart control available, you need:

要被使用.NET Framework 4.0或更高版本,或者.NET Framework 3.5的安装此:的 http://www.microsoft.com/en-us/download/details.aspx?id=14422 在工具箱上下文菜单 - >选择项目...有选择的图表控件。 (按名称排序的选择工具箱项对话框,然后滚动到表有两种:。一个用于Windows形式,一种为Web表单,您只需要选择什么是相关的)

图表控件出现在工具箱的数据部分。

The chart control appears in the "Data" section of the Toolbox.

您不需要任何任何使用条款的形式源文件,或项目引用任何引用。 (参考自动为您当您添加控件添加。)

You do NOT need to any any "using" clause to the form source file, or any reference in the project references. (The reference is added automatically for you when you add the control.)