Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a default margin or padding for a Grid in Xamarin?

I want to specify two grid rows next to each other. But seems like there may be a default padding. I saw a lot of posts about this but none saying what the default might be.

Is that the case that there is a default and if so then is it possible to override this?

like image 944
Alan2 Avatar asked Mar 09 '23 04:03

Alan2


1 Answers

It has a ColumnSpacing and RowSpacing defaults. To override this, just set <Grid RowSpacing=0 ColumnSpacing=0>.

The defaults in grid can be found at the source code (https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Core/Grid.cs)

like image 106
Diego Rafael Souza Avatar answered Mar 15 '23 05:03

Diego Rafael Souza