maui 背景图填充,必须以Grid为节点,否则无效

    <Grid>
        <Image  Source="banner_pdetail.png" HorizontalOptions="Center"   Aspect="AspectFill"></Image>
        <VerticalStackLayout VerticalOptions="End">
            <BoxView 
                 x:Name="bvHeaderRadius"
                 Color="#000000"
                 CornerRadius="80,80,0,0"
                 WidthRequest="375"
                 HeightRequest="80"
                 VerticalOptions="End"
                 HorizontalOptions="Center" ></BoxView>
        </VerticalStackLayout>
    </Grid>


<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="RG3.MauiAppHostDemo.ScriptureDetailPage">
    <!--#region 重新设置 Sheel标题-->
    <!--<Shell.TitleView >
        <Grid >
            <Image
                Source="dotnet_bot.png"
                HorizontalOptions="Start"
                VerticalOptions="Center"  HeightRequest="32"/>
            <Label 
                Text="目录"
                Padding="32,0"
                TextColor="White"
                HorizontalOptions="Start"
                VerticalOptions="Center"
                FontSize="Title" />
        </Grid>
    </Shell.TitleView>-->
    <!--#endregion 重新设置 Sheel标题-->


    <ContentPage.Resources>
        <StyleSheet Source="/Resources/Styles/HomeStyle.css" />
    </ContentPage.Resources>

    <Grid>
        <Image  Source="banner_pdetail.png" HorizontalOptions="Center"   Aspect="AspectFill"/>
        <VerticalStackLayout VerticalOptions="End">
            <BoxView 
                 x:Name="bvHeaderRadius"
                 Color="#000000"
                 CornerRadius="80,80,0,0"
                 WidthRequest="375"
                 HeightRequest="80"
                 VerticalOptions="End"
                 HorizontalOptions="Center" />
        </VerticalStackLayout>
    </Grid>

</ContentPage>
文档更新时间: 2023-04-03 10:38   作者:admin