【发布时间】:2017-04-04 19:12:49
【问题描述】:
我是 Windows phone 开发的新手,在 UserControl 中设置背景图像时遇到了困难。我希望将其作为静态资源,该图像仅适用于特定的 xaml 文件。已经存储了 在我项目的 Assets 文件夹中。使用下面的代码,我仍然无法在预览窗口中看到我的图像
这是我的 xaml 文件:
<UserControl
x:Class="OrangePulse.LoginControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:OrangePulse"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="800"
d:DesignWidth="500">
<UserControl.Resources>
<BitmapImage x:Key="splashScreen" UriSource="/Assets/loginBgd.png"/>
</UserControl.Resources>
【问题讨论】:
标签: c# xaml user-controls windows-phone-8.1 wpf-controls