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.
Created attachment 16864 [details]
Xamarin Project to Repro Issue
Steps to Reproduce
1. Create a ContentPage that contains a CarouselView
2. Top child of the CarouselView is a ScrollView which contains one Label
3. The ContentPage is navigated to from another page
4. Run UWP on Desktop
I have attached a repro project.
The label on the first view appears at the upper right corner of the page.
The label appears halfway across the top of the page. Setting the background of the page to a different color shows that it is not laying out properly. My app has a Material design with a series of white StackLayouts on a grey background. It looks like they are laying out at the correct width, just offset 50% horizontally.
If you flip through the pages of the CarouselView, the first two pages are incorrect, then the remaining pages are correct. If you scroll to the fourth page and scroll back, the first two pages are now correct. I assume this is because the views are being reused.
If you resize the window on the first page, the view relays out correctly.
If the page is the first page in the Navigation stack, it does not happen, you need to navigate to the page.
If there is no ScrollView, it does not happen. Most mobile apps need a ScrollView though to handle potentially small screen sizes.
The attached demo does not show it because I minimized it to one label, but if the UWP window is smaller than the content (requires scroll?) it also does not happen.
It does not happen on Android and I have not tested iOS.
Running on Window 10 Desktop
I over-simplified my original repro. You also need a StackLayout as a child of the ScrollView. CarouselView -> ScrollView -> StackLayout -> Label
Uploading updated repro.
Created attachment 16867 [details]
Updated Repro Solution
CarouselView to be deprecated and replaced with https://github.com/xamarin/Xamarin.Forms/pull/853