WPF VS2013: An error occurred while finding the re

2019-02-18 15:47发布

问题:

Team,

I have a simple wpf project in Visual Studio 2013. The structure is shown below. All that the error says is as shown in the title "An error occurred while finding the resource dictionary". I have tried many suggestions from the net and running out of patience. Every thing seems to be alright. Any one experienced with this can kindly suggest some thing. Thanks in advance.

回答1:

It should read:

...Source="/Skins/MainSkin.xaml"

As the skin isn't in the Content directory.

At the moment it's looking for Content/Skins/MainSkin.xaml (hence / will 'take it up' a directory back to the root).