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 for Bug 53032 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 20128 [details]
Sample Project Exhibiting the issue
It appears that Labels in a StackLayout have their width incorrectly calculated for Pages in a CarouselPage not currently loaded on screen. See attached app for reproduction
1. Load app and in the master view of the Master Detail select Carousel
1a. Observe the Text in its Horizontal alignment, labels are end, center end
2. Swipe right to the green page
2a. Observe label is centered here
3. Select Contacts from the Master View
4. Select Carousel
4a. Notice here the "green" Label is still centered
5. Swipe left to the Red screen
Expected, Text alignment is preserved
Actual, text is aligned at Start
What I think is happening is when the CarouselPage is loaded, the Labels calculated size fills the entire horizontal span, and thus the text is centered. When you load a different page, navigate away from the CarouselPage, navigate back and then return to the original loaded CarouselPage, the Labels width is misscalculated to only be the length of the text, and the Label control itself instead of the fill. So while HorizontalTextAlignment is preserved, the acutal size of the Label changes.
As a note, commented in the code is the same setup using a Grid instead of a StackLayout, and this issue is not exhibited.
Found using Xamarin.Forms 126.96.36.199
Thank you for reporting this! Let me run the attached project to try reproducing this so I can confirm this issue. I will update the report with my results.
Created attachment 20813 [details]
I was able to reproduce this issue with the project provided. I'm attaching a minimized version with new repro steps and confirming this issue so the team can investigate further.
### Steps to Reproduce
1. Run the attached project
2. Swipe to the green page
3. Press "Next Page"
4. Press "Go Back"
5. Swipe back to the red page
### Expected Results
The bottom Label will still be End aligned
### Actual Results
The Label appears to be Start aligned
### Regression Test