Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

BackgroundColor changes Button size?

$
0
0

I have two buttons in a Horizontal Stack panel.

<StackLayout Orientation="Horizontal" VerticalOptions="End">
  <Button Text="Reset" />
  <Button Text="Search" HorizontalOptions="FillAndExpand" BackgroundColor="#3b5998" />
</StackLayout>

When I apply a BackgroundColor to one, it changes in size to fill the StackPanel. Am I misunderstand something or is this a bug? I have tried to apply a margin to this but it simply expands the StackPanel and causes the other button to expand further!

Without BackgroundColor:

With BackgroundColor:

I would appreciate any advice, many thanks.

Edit: I am using Xamarin.Forms 2.2.0.4-pre1 because of my use of Prism.Unity.Forms


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>