Page 1 of 1

ViewXY null reference exception when setting axis.visible

Posted: Tue Jun 10, 2014 3:18 pm
by greggorob64
I'm trying to set up my graphing controls hide many features when minimized and show them when maximized. For some reason; i'm getting an exception when I attempt to hide the Y-Axis in my 2-d recording. Any ideas what I can do about this?

Image

System.ArgumentOutOfRangeException occurred
HResult=-2146233086
Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source=mscorlib
ParamName=index
StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
InnerException:


Image

Thanks!

Re: ViewXY null reference exception when setting axis.visibl

Posted: Tue Jun 10, 2014 4:21 pm
by ArctionPasi
Please update to 6.0.5 and let me know if the problem persists.

Re: ViewXY null reference exception when setting axis.visibl

Posted: Tue Jun 10, 2014 5:38 pm
by greggorob64
That worked, thanks! I also had to make a small change, since the 'ownerview' got moved to read-only

Image

Was I using it incorrectly there originally?

Re: ViewXY null reference exception when setting axis.visibl

Posted: Tue Jun 10, 2014 5:53 pm
by ArctionPasi
The view object is intended to be given as constructor parameter. To prevent misunderstandings OwnerView was made read-only.

Re: ViewXY null reference exception when setting axis.visibl

Posted: Thu Jun 12, 2014 2:08 pm
by greggorob64
Going back to this; I'm thinking the root cause was me accidentally using Suspend/Resume Layout instead of Begin/End Update.