0

我有这个代码:

<Window x:Class="wpf_2.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525" WindowStyle="None" WindowState="Maximized">
<Grid>
    <Button Content="Button" HorizontalAlignment="Left" Margin="287,147,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_2"/>
    <Image Source="bg.png" Stretch="UniformToFill"></Image>
</Grid>

但是当我运行项目时,只显示按钮而不是背景图像。

4

0 回答 0