25
votes

I've looked through the Xamarin help pages, and might have missed something. As I cannot seem to find any explanation of what the padding numbers are. Here for example:

<StackLayout Padding="20,0,0,0">
<StackLayout Padding="20,10,0,0">
<StackLayout Padding="20,0">

What is the 1st, 2nd, 3rd and 4th and what happens when I just specify two padding numbers?

1

1 Answers

56
votes

They're defined as a Thickness

1 parameter - uniform size

2 parameters - horizontal, vertical

4 parameters - left, top, right, bottom