我想弄清楚。如何將 Login-Button 放在視圖的末尾,但放在 placeholderText 的前臺。這個綠色文本欄位稍后應該被地圖視圖替換。我當前的代碼:
<?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:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="FreemomentApp.GUI.Views.Examples.MapInterface"
Shell.NavBarIsVisible="True">
<ContentPage.Content>
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
HeightRequest="1" BackgroundColor="DarkOrange" >
<StackLayout Padding="10,10,10,10" VerticalOptions="End" BackgroundColor="Aqua">
<Label Text="placeholderText"/>
</StackLayout>
<StackLayout Padding="10,10,10,10" VerticalOptions="End">
<Button VerticalOptions="Center" Text="Login"/>
</StackLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage>
我現在的狀態是這樣的:

我的目標視圖應該是這樣的:

如果有人可以幫助我提示,那就太好了。我怎樣才能達到我應該的狀態。
祝你有個美好的夜晚。
uj5u.com熱心網友回復:
嘗試這個。
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
HeightRequest="1" BackgroundColor="Aqua" >
<Label Text="placeholderText" Margin="10,10,10,10"/>
<StackLayout Padding="10,10,10,10" VerticalOptions="EndAndExpand">
<Button VerticalOptions="Center" Text="Login"/>
</StackLayout>
</StackLayout>
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/429306.html
