找不到名称/键为 PhoneProgressBarBackgroundBrush 的资源 [英] Cannot find a Resource with the Name/Key PhoneProgressBarBackgroundBrush

查看:23
本文介绍了找不到名称/键为 PhoneProgressBarBackgroundBrush 的资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去 2 天我一直在尝试调试此问题,我尝试了 SO 和 Microsoft connect 上可用的所有解决方案,但似乎找不到任何解决方案.

I am trying to debug this issue for last 2 days, I have tried all the solutions available on SO and Microsoft connect but can't seem to find any solution.

我下载了 Windows Phone 8 sdk,安装并创建了一个新项目,但是当我尝试编辑 App.xaml 时我得到了

I downloaded the Windows Phone 8 sdk, installed and created a new project, but when I tried to edit App.xaml I got

XamlParseException:找不到名称/键为 PhoneProgressBarBackgroundBrush 的资源 [行:729 位置:39]在 MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, Boolean expandTemplatesDuringParse, Boolean trimDeclaredEncoding)在 System.Windows.Controls.Control.GetBuiltInStyle(IntPtr nativeTarget, IntPtr& nativeStyle)

请帮我解决这个问题.

推荐答案

有同样的问题,重新安装 WP8 SDK 也没有帮助.

Had same issue, reinstalling WP8 SDK didn't help either.

可以通过将 ThemeResources.xaml 添加到项目资源中来解决该问题,如下所示:

The problem can be overcome by adding ThemeResources.xaml to the project resources as follows:

混合:在项目视图中,右键单击资源文件夹并选择链接到现有项目...".添加 C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Design\ThemeResources.xaml 在那里,它应该可以工作.

Blend: In project view, right click Resources folder and choose "Link to existing item...". Add C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Design\ThemeResources.xaml there and it should work.

VS2012:在解决方案资源管理器中,右键单击文件夹资源"并选择添加"->现有项目...".导航到 C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Design\ThemeResources.xaml 并选择添加为链接".

VS2012: In Solution Explorer, right click folder "Resources" and choose "Add" -> "Existing item...". Navigate to C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Design\ThemeResources.xaml and choose "Add as link".

我不知道根本原因,即为什么 ThemeResources.xaml 未包含在新项目中.

I've got no idea about the root cause i.e. why ThemeResources.xaml isn't included in the new project.

这篇关于找不到名称/键为 PhoneProgressBarBackgroundBrush 的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆