我正在关注本教程: http: //msdn.microsoft.com/en-US/library/windowsphone/develop/jj206974 (v=vs.105).aspx
这是一个全新的 Windows Phone 8 项目,包含ResolutionHelper
类和MultiResImageChooser
类。
在App.xaml
中,我已经添加了命名空间映射,但是当我添加应用程序资源时,我从编译器中得到一个错误:
"The tag 'MultiResImageChooser' does not exist in XML namespace 'clr-namespace:MultiResSnippet'"
这是 App.xaml 的代码:
<Application
x:Class="Upgrade.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:h="clr-namespace:MultiResSnippet">
<!--Application Resources-->
<Application.Resources>
<h:MultiResImageChooser x:Key="MultiResImageChooser"/>
</Application.Resources>
<Application.ApplicationLifetimeObjects>
<!--Required object that handles lifetime events for the application-->
<shell:PhoneApplicationService
Launching="Application_Launching" Closing="Application_Closing"
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
</Application.ApplicationLifetimeObjects>