如何使按钮之间的空间为零?

时间:2018-02-01 03:50:51

标签: xamarin stacklayout

我在xaml中有这个

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:local="clr-namespace:project"
         x:Class="project.MainPage">


<StackLayout Padding="0,0,0,15" Spacing="0"> <!-- multiple things in a    page -->

    <Button Text="first" HorizontalOptions="Center"  VerticalOptions="CenterAndExpand"/>

    <Label Text="title" 
       VerticalOptions="CenterAndExpand" 
       HorizontalOptions="Center" />

        <!--<Entry Text="Registrarse"  VerticalOptions="CenterAndExpand" 
       HorizontalOptions="Center"/>
    <Entry Text="Iniciar Sesion"
       HorizontalOptions="Center" VerticalOptions="Start"/>-->


    <Button Text="Registrarse" HorizontalOptions="Center"  VerticalOptions="Center" Margin="0,0,0,0" />
    <Button Text="Iniciar Sesion" HorizontalOptions="Center"  VerticalOptions="Center" Margin="0,0,0,0" />

</StackLayout>

我想知道为什么按钮总是垂直分开而不是一个在另一个上面

0 个答案:

没有答案