Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Default Spacing between items in a StackLayout?

$
0
0

I'm not sure if this is new behavior, or just something I haven't noticed before. I'm building a simple page with a StackLayout, and I expect the items in the layout to butt directly against one another. However, there is a gutter between them where you can see the background color of the StackLayout.

How can I control the size of the "gutter"?

            <StackLayout WidthRequest="150" BackgroundColor="Lime">
                <BoxView BackgroundColor="#959b8d" HeightRequest="30" />
                <BoxView BackgroundColor="#E1E2DD" HeightRequest="10" />
                <BoxView BackgroundColor="#959b8d" HeightRequest="30" />
                <BoxView BackgroundColor="#E1E2DD" HeightRequest="10" />
                <StackLayout HeightRequest="30" WidthRequest="200" HorizontalOptions="Center" BackgroundColor="#959b8d" Orientation="Horizontal" >
                    <Label FontSize="12" TextColor="Red" Text="Select" />
                    <Label FontSize="12" TextColor="Red" Text="Start" />
                </StackLayout>
                <BoxView BackgroundColor="#E1E2DD" HeightRequest="10" />
                <StackLayout BackgroundColor="White" WidthRequest="200" HeightRequest="50" Orientation="Horizontal">
                </StackLayout>
                <BoxView BackgroundColor="#E1E2DD" HeightRequest="10" />
                <BoxView BackgroundColor="#959b8d" HeightRequest="30" />
            </StackLayout>


Viewing all articles
Browse latest Browse all 58056

Trending Articles