[英]Can't get background image to show in windows phone pivot grid
I can't get background image to show in windows phone pivot grid. 我无法在Windows Phone枢轴网格中显示背景图像。 Here's the code:
这是代码:
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot">
<Grid.Background>
<ImageBrush ImageSource="/BackgroundImage.jpg"/>
</Grid.Background>
I've tried it with the '/' and without eg 我用'/'尝试过,没有例如
<ImageBrush ImageSource="BackgroundImage.jpg"/>
and with 与
<ImageBrush ImageSource="/BackgroundImage.jpg"/>
both show the background image in design view but not in emulator or device. 两者都在设计视图中显示背景图像,但在模拟器或设备中不显示。 Any help?
有帮助吗? (This is for the main app background).
(这是主应用程序背景)。
请确保您图片的“Build Action”属性为Content。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.