我在Visual Studio 2013中创建了通用Windows App Store应用程序。我创建了一个ResourceDictionary
名为的文件AllButtonShapes.xaml
。在我的应用程序的“共享”部分中,App.xaml
文件包含以下内容:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="AllButtonShapes.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
在该应用程序的Windows部分中,这可以正常工作,并且我的应用程序能够找到中定义的资源AllButtonShapes.xaml
。但是,当我尝试启动应用程序的Windows Phone部分时,找不到这些资源。
如何获得通用应用程序的Windows Phone部分以查看在应用程序资源中定义的资源?
尝试使用绝对路径
<ResourceDictionary Source="/AllButtonShapes.xaml"/>
老实说,我无法重现此问题。您可以尝试检查字典的构建动作,必须将其设置为Page
。可能是名称冲突或其他问题。可以共享您的项目文件吗?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句