Phathutshedzo Khabubu
Phathutshedzo Khabubu

Reputation: 252

How do I reduce the space between buttons in Xamarin Forms

enter image description here

I am creating a cross platform application using Xamarin Forms, However as you can see on the left the spacing in between my buttons in my android application is too much as I can not seem to reduce it. The buttons are children of a StackLayout.

Upvotes: 2

Views: 3534

Answers (2)

Exel Gamboa
Exel Gamboa

Reputation: 946

If accepted solution does not work for you in Xamarin.Forms (Xamarin 4.10), you can also specify the following:

<StackLayout Padding="20" Spacing="0"> ... </StackLayout>

Upvotes: 2

G.Mich
G.Mich

Reputation: 1666

Add a different spacing on each platform

<StackLayout.Spacing>
  <OnPlatform x:TypeArguments="x:double" iOS="5" Android="0" WinPhone="10" />
</StackLayout.Spacing>

Upvotes: 7

Related Questions