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 19842 [details]
Sample replicating the issue is attached
When a button is set as the content of the ContentView, the button is not layout in FillAndExpand LayoutOption
You can replicate the issue in the sample attached.
I ran the attached project (which is using Forms 18.104.22.168) but I don't believe I was able to reproduce the issue. On all platforms the yellow button filled the entire page. And if I set the LayoutOptions to "Start", "Center", etc it would also work as expected.
What are you seeing when you run the attached project? Also, what platforms(s) you are experiencing this on?
Created attachment 19919 [details]
Screenshot replicating the issue is attached
I provided the screenshot replicating the issue. In the screenshot you can see the yellow button having a Aqua border for the LayoutOption "FillAndExpanded". The background of the parent (aqua color is given as background to the parent) is in the view, replicating the issue that the button is not FillAndExpanded. I am able to reproduce this issue in Xamarin.Forms(Android).
Created attachment 19937 [details]
native android project
The space around the Button is from the native Android Button's default background which has transparent pixels around the sides. I've attached a native Android project that shows this is the default behavior.
You can use a custom renderer to provide your own background drawable or color in order to eliminate the extra space.
Marking as RESOLVED per info in comment 3