I'm working in a small piece of UI in Xamarin just a "card" with some labels and two buttons in the right side as a column. Here you can see my Xaml:
<Grid BackgroundColor="White" RowSpacing="0" ColumnSpacing="0" Margin="10,10,10,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<StackLayout Grid.Column="1"
Spacing="0"
BackgroundColor="PaleGoldenrod">
<Button Text="OPEN" Margin="0"
VerticalOptions="FillAndExpand"
HeightRequest="70"/>
<Button Text="RESET" Margin="0"
VerticalOptions="FillAndExpand"
HeightRequest="70"/>
</StackLayout>
<Label TextColor="Black" Margin="5">Relojes</Label>
<Label HorizontalTextAlignment="End"
TextColor="Black"
Margin="5">Sin Tocar</Label>
</grid>
And here you can see a picture of what I've got:
I want to remove the space between the two buttons so they are evenly spaced all around. I tried setting the bottom margin in the upper button as -2.5 and the upper margin of the bottom button as -2.5 and looks Ok but .. There must be a cleaner option. Any idea ??
Use
Spacing
inStackLayout
to reduce space between controls. HereSpacing
in minus.