【发布时间】:2015-01-25 14:28:18
【问题描述】:
我正在尝试将背景图像添加到我的 Windows 手机全景应用程序。当我使用 XAML 代码添加图像时,可以在预览中看到图像。但是当我运行应用程序时,我看不到图像。我使用的图像尺寸 1536x1280
这是我使用的 XAML 代码;
<phone:Panorama.Background>
<ImageBrush ImageSource="/Assets/back.png"/>
</phone:Panorama.Background>
我还尝试了以下 C# 代码;
BitmapImage bitmapImage = new BitmapImage(new Uri("/Assets/back.png", UriKind.Relative));
ImageBrush imageBrush = new ImageBrush();
imageBrush.ImageSource = bitmapImage;
this.Background = imageBrush;
我在 Visual Studio 预览中看到的效果
我如何在模拟器和设备中看到
【问题讨论】:
-
你的镜像文件的构建动作是什么?
-
对不起,我听不懂。什么是构建操作。
标签: c# xaml background windows-phone-8.1 panorama-control