zhh95 2019-01-07 10:45 采纳率: 0%
浏览 410

uwp xml 背景图片没有显示是什么情况

想做个界面的背景图片,在其中的一个界面上可以显示,但是新建的界面却没能显示图片,不知道什么原因,下面为没出图片界面的代码。大佬帮忙看下,谢谢。
x:Class="EBoatApp.Views.ActivatePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:EBoatApp.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<Grid>
    <Grid.Background>
                    <ImageBrush Stretch="Fill"  ImageSource="Skin/Icon/背景.jpg"></ImageBrush>
    </Grid.Background>
    <Grid.RowDefinitions>
        <RowDefinition Height="15*"/>
        <RowDefinition Height="85*"/>
    </Grid.RowDefinitions>
    <Grid Grid.Row="0" Background="lightBlue"></Grid>
    <TextBlock Text="BOSON 干式荧光免疫分析仪" Grid.Row="0" HorizontalAlignment="Left" FontSize="36" Foreground="Blue"  Margin="20,0,0,0" FontStyle="Italic"  
               IsColorFontEnabled="True"  >
    </TextBlock>
    <Border Grid.Row="1">
        <Border.Background >
            <ImageBrush Stretch="UniformToFill" AlignmentX="Center" ImageSource="Skin/Icon/背景.jpg"></ImageBrush>
        </Border.Background>
        <Image HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch"  />
    </Border>
    <!--<Grid Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
        <Grid.Background>
            <ImageBrush Stretch="UniformToFill" AlignmentX="Center" ImageSource="Skin/Icon/背景.jpg" />

        </Grid.Background>
    </Grid>-->
</Grid>

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 java如何提取出pdf里的文字?
    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 自己瞎改改,结果现在又运行不了了
    • ¥15 链式存储应该如何解决