【发布时间】:2022-12-11 05:14:42
【问题描述】:
多年来我一直在使用 xamarin,我知道这段代码应该有效:
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Skillbased.Pages.LogIn.CreateAccount.Page_Tutorial"
Title="Page_Tutorial">
<ScrollView>
<StackLayout>
<Grid Margin="0,30,0,0">
<Image Source="img_headerbar"/>
<Label VerticalOptions="Center"
FontFamily="BebasNeue"
FontSize="30"
HorizontalOptions="Center"
Text="WARUM SKILLBASED?"/>
</Grid>
<Image VerticalOptions="Start" Source="img_bike"/>
</StackLayout>
</ScrollView>
</ContentPage>
但结果是这样的:
不,底部的图片顶部没有大的空白区域。
我什至用网格试过了,但它仍然位于底部。这里到底发生了什么?
编辑:
哦,如果我尝试在 android 上部署:
.. 事情解决了,但是关闭了,这里的字体不能在 android 上正确加载......不管怎样,问题似乎是为什么 maui
【问题讨论】:
-
是的,我在最外面做了网格,我也做了 verticalstacklayout。两者都不起作用,而且这个问题只出现在 ios 上(正如你在我的编辑中看到的那样)。其他未满屏的图片也不存在此问题
-
抱歉,我在您编辑后删除了我的评论,因为它不再适用了。