Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Divide by Zero error #27

Open
SShaw1985 opened this issue Apr 7, 2017 · 4 comments
Open

Divide by Zero error #27

SShaw1985 opened this issue Apr 7, 2017 · 4 comments

Comments

@SShaw1985
Copy link

The following line causes an erro when displaying an empty carouselview wrapped in a stackpanel that is set to bein invisible

https://github.com/xamarin/Xamarin.Forms.CarouselView/blob/master/txt/src/carouselView/dev/Shared.Android/CarouselViewExtensions.cs#L267

it needs to have a 0 check there somewhere, maybe like this

int position = 1
if((_itemSize.Width + positionOrigin)>0)
position = x / _itemSize.Width + positionOrigin;

@hardcodet
Copy link

@johncdoherty
Copy link

Is there any fix planned for this and the resulting bug?

@hardcodet
Copy link

@johncdoherty This control is basically obsolete. Switch to https://github.com/alexrainman/CarouselView.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants