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 15343 [details]
As the title says it, setting Page Content from code doesn't work when doing first assignment. Second assignment sets it correctly for iOS. Android works fine
In the attachment is the code used (Note: code is called on SizeChanged event of the page and _newSchool and _archive is are custom controls).
I'm using Xamarin for Visual Studio with Xamarin.Forms.
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue we would very much appreciate it.
Also, please specify which version of Xamarin.Forms you are using.
Xamarin Forms Team
Created attachment 15363 [details]
Full working example
Added additional attachment with a full solution that is able to reproduce the bug.
I'm using latest Xamarin.Forms which is at the moment 220.127.116.1126.
Last Xamarin.Forms that didn't exhibit this problem was 18.104.22.16805.
Sorry for the example that did not exhibit the issue, my time was limited yesterday to test it.
Created attachment 15364 [details]
Excluded all unnecessary projects.
Oh and one note - the bug occurs when rotating the device - first assignment works fine, but all later ones need multiple assignments to work.
Thank you, I have re-added this bug to the triage queue :)
private void RemoveFromParent(View view)
var parent = view.Parent as Layout<View>;
Add that method and call it before you call Children.Add in your GetPortraitLayout/LandscapeLayout methods. This will be done automatically for you in a future release.
I have checked this issue with Xamarin.Forms 2.2.0-pre1 and its working fine.
Hence closing this issue.