Xamarin Forms Margins

At Last! Xamarin Forms 2.2.0 includes Margins support!

Here are the docs with a great visual.
enter image description here

UPD Special for @AUSTX_RJL
Margin value is Thickness, just like in any other XAML frameworks.

You can set Thickness in XAML by setting one, two or four values separated by comma or whitespace:
"1 2 3 4" is same as "1, 2, 3, 4" and sets:

  • 1 for Left
  • 2 for Top
  • 3 for Right
  • 4 for Bottom

Fields of Thickness

"1 2" sets:

  • 1 for Left and Right fields
  • 2 for Top and Bottom fields

"1" sets 1 for all fields of Thickness

Leave a Comment