.NET 4.0中的异常. [英] exception in .net 4.0.
本文介绍了.NET 4.0中的异常.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
当我尝试使用以下代码时
Hi all,
When i try to use below code
ChartType = "line";
chart1.ChartAreas["Default"].AxisX.ArrowStyle = AxisArrowStyle.SharpTriangle;
chart1.ChartAreas["Default"].AxisY.ArrowStyle = AxisArrowStyle.SharpTriangle;
我收到以下异常,可能是什么问题?
在"ChartAreaCollection"中找不到名称为"Default"的图表元素.
----预先感谢---------
I get the following exception, what could be the problem ??
A chart element with the name ''Default'' could not be found in the ''ChartAreaCollection''.
---- thanks in advance ---------
推荐答案
确保图表区域集合中确实存在名为"Default"的区域图1.
要么完全丢失,要么名称不同.
Make sure an area named ''Default'' does exist in the chart areas collection of chart1.
Either this is completely missing or the name is different.
在WinForms设计器中设计图表时,必须修改名为ChartAreas
的属性.创建的默认区域称为默认".您似乎已将其更改为其他内容.因此,您可以做的是:在代码中更改默认"或仅将设计器中的图表区域重命名为默认"
When designing your chart in the WinForms designer, you must modify the property called ChartAreas
. The default area that is created is called "Default". You seem to have changed it to something different. So what you could do is: Change "Default" in your code or just rename the chart area in your designer to "Default"
这篇关于.NET 4.0中的异常.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文