Alan2
Alan2

Reputation: 24572

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?

Upvotes: 4

Views: 5528

Answers (1)

Diego Rafael Souza
Diego Rafael Souza

Reputation: 5313

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)

Upvotes: 7

Related Questions