- Home
- Forum
- Xamarin.Forms
- Index was out of range - SfLinearGouge
Index was out of range - SfLinearGouge
Hi,
I am testing the component using the code below from SyncFusion Documentation Site:
<linear:SfLinearGauge>
<linear:SfLinearGauge.Annotations>
<linear:LinearGaugeAnnotation ScaleValue ="60" OffsetX = "0.5" OffsetY ="0.6" ScaleIndex ="1">
<linear:LinearGaugeAnnotation.View>
<Label Text="Receitas" FontAttributes = "Bold" TextColor= "#F95C85" FontSize ="10"/>
</linear:LinearGaugeAnnotation.View>
</linear:LinearGaugeAnnotation>
</linear:SfLinearGauge.Annotations>
<linear:SfLinearGauge.Scales>
<linear:LinearScale ScaleBarColor="#e0e9f9" LabelColor="#424242" ScaleBarSize = "40" LabelFontSize ="14" MinorTicksPerInterval ="0">
<linear:LinearScale.MajorTickSettings>
<linear:LinearTickSettings Thickness="10" Color ="#9E9E9E" Length = "10"/>
</linear:LinearScale.MajorTickSettings>
<linear:LinearScale.Pointers>
<linear:BarPointer Value="75" EnableAnimation = "false" Color = "#36d1dc" Thickness = "20" CornerRadiusType = "Start" CornerRadius = "10"/>
</linear:LinearScale.Pointers>
</linear:LinearScale>
</linear:SfLinearGauge.Scales>
</linear:SfLinearGauge>
And when I enter in the page, Xamarin return to me this error:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Stack Tracer:
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/Collections/Generic/List.cs:161
at System.Collections.ObjectModel.Collection`1[T].get_Item (System.Int32 index) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs:46
at Syncfusion.SfGauge.iOS.SFLinearGauge.TicksLayer () [0x000ed] in <9405b71f46a64445a74fbcf87ad39027>:0
at Syncfusion.SfGauge.iOS.SFLinearGauge.Draw (CoreGraphics.CGRect rect) [0x00033] in <9405b71f46a64445a74fbcf87ad39027>:0
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.39/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.39/src/Xamarin.iOS/UIKit/UIApplication.cs:65
at e_Beauty.iOS.Application.Main (System.String[] args) [0x00001] in /Users/henriquedrumond/Projetos/e-Beauty/e_Beauty.iOS/Main.cs:18
What happens?
Thanks a lot.
SIGN IN To post a reply.
5 Replies
RS
Ramya Soundar Rajan
Syncfusion Team
March 31, 2020 01:37 PM UTC
Hi Henrique,
Greetings from Syncfusion.
We have already fixed the reported issue and it will be available in our latest NuGet (18.1.0.36). Could you please upgrade and let us know whether you have resolved the issue or not?
Regards,
Ramya S
HE
Henrique
March 31, 2020 02:07 PM UTC
Hi,
In my case, I don't have update. The last version is 17.4.0.55. When I try update the Nuget return only this version to me. I am using the Visual Studio 2019 for Mac.
Tks
RS
Ramya Soundar Rajan
Syncfusion Team
April 1, 2020 09:23 AM UTC
Hi Henrique,
To upgrade the NuGet version to 18.1.0.36, you need to enable the show pre-release packages in manage NuGet packages since it is beta release version as shown in below screenshot.
Regards,
Ramya S
HE
Henrique
April 1, 2020 12:13 PM UTC
Hi.
After update, the resource is ok now.
Tks
RS
Ramya Soundar Rajan
Syncfusion Team
April 2, 2020 05:54 AM UTC
Hi Henrique,
Thanks for your update.
If you need any further assistance, please don't hesitate to contact us.
Regards,
Ramya S
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
HE Henrique
- Mar 30, 2020 05:21 PM UTC
- Apr 2, 2020 05:54 AM UTC