-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Xamarin.Forms] CollectionView doesnt scroll to item completly in carousel layout #76
Comments
I discovered that this behaviour is kind of inteded, because in the CollectionViewRenderer in the ScrollToCurrentItem Method there is a offset calculated when the Snap Style is Center. Would it be possible to create a seperate SnapStyle which works like the SnapStyle Center but when it comes to scrolling no offset is calculated. Or a property in the CollectionView to disable offset calculation in the scrollToCurrentItem Method? |
If you say one of my given solutions would by fine to you, i can make the changes and provide a pr :) |
Hi just wanted to check if there are any news on this issue :) |
should be fixed in next version |
Platform (please complete the following information):
Describe the bug
CollectionView doesnt scroll to an item completly in carousel layout, instead two items are half visible as you can see in the screenshot.
It seems like the SnapStyle Center causes this issue.
To Reproduce
I created a view and viewmodel, where in the viewmodel the currentindex of the CollectionView is set. When the view appears it seems like the collection view doesnt scroll but because of the snap style center the correct item is not entirely displayed. Instead the collection view is kind a stucked between two items.
I tried the same with a collectionview with horizontal layout and snap style start, and the scrolling just worked perfectly. So i assume the problem is the snap style center, which is mandatory for carousel layout at the moment.
Screenshots (if applicable)
The text was updated successfully, but these errors were encountered: