Hi!
I have a Graph with one horizontal and two vertical axes. I want to remove the second vertical. I do:
MyGraph.Axes.RemoveAt(2);
And get:
System.ArgumentOutOfRangeException was unhandled
I checked and, the MyGraph.Axes array has indeed 3 elemets.
The Stactrace looks like this:
System.ArgumentOutOfRangeException was unhandled
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()
at NationalInstruments.Controls.Primitives.NotifyingCollection`1.get_Item(Int32 index)
at NationalInstruments.Controls.Internal.GraphComponentManager`2.a(Orientation A_0)
at NationalInstruments.Controls.Internal.GraphComponentManager`2.<>c__DisplayClasse.<OnScaleCollectionChanging>b__c()
at NationalInstruments.Controls.Primitives.NotifyingCollection`1.ChangeItemsCore(Int32 index, Int32 removeCount, T[] newItems)
at NationalInstruments.Controls.Primitives.AxisCollection.ChangeItemsCore(Int32 index, Int32 removeCount, ICartesianAxis[] newItems)
at NationalInstruments.Controls.Primitives.NotifyingCollection`1.ChangeItems(Int32 index, Int32 removeCount, T[] newItems)
at NationalInstruments.Controls.Primitives.NotifyingCollection`1.RemoveAt(Int32 index)
Does anybody have any ideawhat could cause this?