Windows 8 XAML-调试时按钮图像未显示

Windows 8 XAML-调试时按钮图像未显示,windows-8,windows-runtime,microsoft-metro,windows-store-apps,winrt-xaml,Windows 8,Windows Runtime,Microsoft Metro,Windows Store Apps,Winrt Xaml,这是我的代码: <Grid Background="Black"> <Button Click="Button_Click" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Image Source="Assets\Images\FlashOff.jpg"/> </Button> </Grid> 按钮背景图像在VisualStu

这是我的代码:

<Grid Background="Black">
    <Button Click="Button_Click" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Image Source="Assets\Images\FlashOff.jpg"/>
    </Button>
</Grid>


按钮背景图像在VisualStudio中显示良好,但在调试时,该图像不会显示。按钮的功能仍然存在。你知道怎么回事吗?

你需要用正斜杠(/)而不是反斜杠(\)


您需要使用正斜杠(/)而不是反斜杠(\)



我也在Visual Studio 2012中尝试过,但没有成功。有没有其他方法可以将按钮拉伸到网格并显示按钮?我在Visual Studio 2012中也尝试过,但没有成功。有没有其他方法可以将按钮拉伸到网格并显示按钮?谢谢。我已经习惯了文件夹路径,我甚至没有想到。仅供参考,resharper在我移动一些图像时添加了反斜杠。我愚蠢地期望它做正确的事情,却遇到了同样的问题。谢谢你。我已经习惯了文件夹路径,我甚至没有想到。仅供参考,resharper在我移动一些图像时添加了反斜杠。我愚蠢地期望它做正确的事情,却遇到了同样的问题。
<Grid Background="Black">
    <Button Click="Button_Click" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Image Source="Assets/Images/FlashOff.jpg"/>
    </Button>
</Grid>