什么是完成設計,如下面,我應該用最好的方式Grid,Stack Layout,Absolute Layout或者Relative Layout

如何在另一個布局的前面添加布局?
uj5u.com熱心網友回復:
有一個叫做“Pancake View”的包,因為你想要實作的是在前面做一張卡片(這個“Buenas Noches ...”所在的地方)和后面的一張卡片或它后面的布局。所以:
用這個插件做卡片,如果你想做
StackLayout,你只需要設定它的背景圖片,在StackLayout Background = "img.png".如果你想做得更好,用這個插件創建卡片,但是把這張卡片放在另一個煎餅視圖中,但那個會填滿整個螢屏,它會有這個背景,例如
PancakeView Background = "img.png"。
按照此鏈接了解如何使用此軟體包。它顯示了Grid示例,然后您將知道如何將這張卡片與其他東西對齊。
uj5u.com熱心網友回復:
您可以使用彈出頁面插件。它可以使布局在另一個布局之前。
從 NuGet 安裝:Rg.Plugins.Popup https://www.nuget.org/packages/Rg.Plugins.Popup
<rg:PopupPage
x:Class="Demo.Pages.FirstPopupPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rg="http://rotorgames.com"
HasSystemPadding="False">
<rg:PopupPage.Animation>
<rg:ScaleAnimation
DurationIn="400"
DurationOut="300"
EasingIn="SinOut"
EasingOut="SinIn"
HasBackgroundAnimation="True"
PositionIn="Center"
PositionOut="Center"
ScaleIn="1.2"
ScaleOut="0.8" />
</rg:PopupPage.Animation>
<StackLayout
Padding="20,20,20,20"
HorizontalOptions="FillAndExpand"
VerticalOptions="Center">
........
</StackLayout>
</rg:PopupPage>
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/386825.html
標籤:用户界面 沙马林 xamarin.forms 安卓系统 xamarin.ios
上一篇:將引數動態傳遞給Xamarin中的BindingContext
下一篇:在AWS中運行r腳本
