Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
First, I would apologize for the "buggie way". I don't find the word which would explain what I want to say!
1. Event is not fired on the construction of the CarouselView.
When the CarouselView has its ItemsSource binded on a list with multiple elements, by default the first element is displayed but ItemSelected or PositionSelected is not fired.
I think it would be fired.
2. I'm not sure if it's the same bug or not but if it's not let me know and I would create another bug.
The Title of the ContentPage is based on the current displayed item of the CarouselView. To achieve that I've binded a property of my ViewModel to the ContentPage.Title and on the carouselView.ItemSelected I push the current selected item in a ViewModel property. Then, when this property is changed, PageTitle is changed and the ContentPage.Title is updated.
When starting sliding (to the left or to the right), ItemSelected (or PositionSelected) event is fired. But if I don't end my swipe (resulting in an unchanged view of the carouselview), PageTitle is already updated and is wrong.
Expected behavior :
ItemSelected and PositionSelected should be fired when the swipe is complete and the CarouselView has effectively changed its displayed item.
The actual behavior is more related to an ItemSelecting or PositionSelecting event I think.
If needed I could make a short video or a small demo project to help you.
David, thanks for your feedback. The first is 'by design'. Some folks seem to want it fired and others not. We've had a few requests for the behavior you describe so I'll raise the question again.
As to the second point, I don't think we'll need a repro; we'll try find better platform hooks.
If it's "by design" it's OK. By binding the "Item" property of the carousel we could know the displayed item (if you could solve bug 40632) so it would be OK for me.
For the second part of the bug, I've changed a part of my code to use a binding on "Item" instead of event "ItemSelected".
Behavior is the same but it's different in iOS and Android (I haven't notice that yesterday).
- on iOS, as the swipe is started, ItemSelected and PositionSelected are fired and Item is updated. It's this case that is buggie I think. With *ing events and Item update when swipe is complete it would be better in my opinion (and more close to design guidelines).
- on Android it's OK. When we start a swipe and not complete it. ItemSelected, PositionSelected are fired only when swipe is completed and Item is updated "normally".
Thanks you !
CarouselView to be deprecated and replaced with https://github.com/xamarin/Xamarin.Forms/pull/853