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.
I downloaded the Windows Phone 8 sdk, installed and created a new project, but when I tried to edit App.xaml I got
XamlParseException: Cannot find a Resource with the Name/Key PhoneProgressBarBackgroundBrush [Line: 729 Position: 39]
at at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, Boolean expandTemplatesDuringParse, Boolean trimDeclaredEncoding)
at System.Windows.Controls.Control.GetBuiltInStyle(IntPtr nativeTarget, IntPtr& nativeStyle)
Please help me resolve this issue.
Had same issue, reinstalling WP8 SDK didn’t help either.
The problem can be overcome by adding ThemeResources.xaml to the project resources as follows:
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:
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”.
I’ve got no idea about the root cause i.e. why ThemeResources.xaml isn’t included in the new project.