繁体   English   中英

无法获取在Windows Phone枢轴网格中显示的背景图像

[英]Can't get background image to show in windows phone pivot grid

我无法在Windows Phone枢轴网格中显示背景图像。 这是代码:

<!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource="/BackgroundImage.jpg"/>
        </Grid.Background>

我用'/'尝试过,没有例如

<ImageBrush ImageSource="BackgroundImage.jpg"/>

<ImageBrush ImageSource="/BackgroundImage.jpg"/>

两者都在设计视图中显示背景图像,但在模拟器或设备中不显示。 有帮助吗? (这是主应用程序背景)。

请确保您图片的“Build Action”属性为Content。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM