Redoing Traveler sample with CarouselView #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Submission description
I decided to remake a sample I've done a while ago called Traveler, which could really benefit from using
CarouselView
. The screenshot below shows the original (left) and the CarouselView version (right). A few differences can be seen which I'll describe in "What didn't go well".What went well
Setting up the basics. It was pretty much a drop-in replacement for the existing stuff. Simply removing some existing properties did the job.
What didn't go well
It has a similar issue as CollectionView where the root element of the DataTemplate has to be a specific type. In my case it's my own control, which has a margin but that margin gets completely ignored. Wrapping it in a
StackLayout
and applying the margin to that does work, however. Is this something I need to do work for on my control's end to support this or is this a Xamarin.Forms thing?I also noticed that even though I have two different sizes specified for the items in the top and bottom carousel they are sized equally. The bottom carousel itself has the same height as the top one, but the item within it doesn't and should actually be centered vertically within it. The
WidthRequest
seems to be completely ignored, even though it's different from the top one.Missing or desired things
Anything else
I'm always up for some wearable swag! 😄
Take out a survey for some goodies
Please visit this link to take a survey. If you provide your contact information, we'll send you some swag!
Ok!