.NET 4.0中的异常.

编程入门 行业动态 更新时间:2024-10-26 16:24:34
本文介绍了.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中的异常.

本文发布于:2023-11-09 05:21:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571491.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:异常   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!