MAUI布局异常:垂直StackLayout元素定位不符预期求助
MAUI布局与字体异常问题排查请求
我拥有多年Xamarin开发经验,以下MAUI XAML代码按逻辑应正常运行,但实际效果存在两个问题:
- iOS端垂直StackLayout内的元素定位不符合预期(底部图片莫名靠下),尝试改用Grid仍未解决;
- Android端布局正常,但存在字体加载异常问题。
相关XAML代码
<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>
运行效果截图
iOS运行效果

Android运行效果

内容的提问来源于stack exchange,提问作者inno
相关产品推荐
相关产品推荐

