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 24373 [details]
sample project for reproducing the issue.
We have tried with Stack Layout as well as Grid Layout by including one label in to it and we are setting Stack Layout background color as gradient color with the help of randerer. So problem occurs when we rotate device orientation from landscape to portrait and vice versa then its width does not cover full screen it becomes half. We have attached the code for the iOS renderer for your reference.
I ran the attached project on both Android and iOS and I only experienced the issue on iOS.
This is happening because Draw() only gets called when the item first appears and not when the screen is rotated. Instead you should add the gradient layer in LayoutSubviews() as this does get called when the screen orientation changes, and set the layer's Frame to this.Frame.
Hope this helps! If you are also seeing this on Android, please re-open this report and let us know what device/emulator you are testing on and what version of Android it is running. Thanks!
LayoutSubviews() working in IOS.
your solution Work.