您好我可以在Forms中使用多个stackLayout吗?
布局下方无法在Android手机中显示:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:mIWIS"
x:Class="myApp.MainPage">
<ContentPage.Content>
<StackLayout Orientation="Vertical" Padding="20,20,20,20">
<Label Text="Username" />
<Entry x:Name="usernameEntry" Placeholder="username" />
<Label Text="Password" />
<Entry x:Name="passwordEntry" IsPassword="true" Placeholder="Password" />
<Label x:Name="messageLabel" />
</StackLayout>
<StackLayout Orientation="Horizontal">
<Button x:Name="BtnClear" Text="Clear" />
<Button x:Name="BtnLogin" Text="Login" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
由于
答案 0 :(得分:0)
<ContentPage.Content>
<StackLayout>
<StackLayout Orientation="Vertical" Padding="20,20,20,20">
<Label Text="Username" />
<Entry x:Name="usernameEntry" Placeholder="username" />
<Label Text="Password" />
<Entry x:Name="passwordEntry" IsPassword="true" Placeholder="Password" />
<Label x:Name="messageLabel" />
</StackLayout>
<StackLayout Orientation="Horizontal">
<Button x:Name="BtnClear" Text="Clear" />
<Button x:Name="BtnLogin" Text="Login" />
</StackLayout>
</StackLayout>
</ContentPage.Content>