unable to resolve resource

Mar 20, 2013 at 12:58 AM
I have copied a resource library from the source code to my applications Themes folder, added it to the project, and then added the reference to the Battleship.xaml file. Everything compiles and the code runs. But it says that:

The resource "CODE.Framework-Layout-SimpleFormLayout" could not be resolved.

This is caused by:
Style="{DynamicResource CODE.Framework-Layout-SimpleFormLayout }">

The Battleship.xaml reference is:
<ResourceDictionary Source=".\Battleship-Layout-StandardForm.xaml"/>

I thought that resource libraries were loaded and if a new style was referenced, the old one would be overwritten.

I could rename the Dynamic Resource, but then would need to create one for the other themes. But what I really want to do is just replace the one that is loaded by default in the Battleship theme and keep the others unchanged.

Or is it because the Key values cannot be duplicated nor do they overwrite each other?

If I am doing this wrong, how do I override the layout for one theme while keeping the same layouts for the other themes?

Thanks
Coordinator
Mar 20, 2013 at 4:21 PM
If you have a file called Battleship-Layout-StandardForm.xaml in your project and it is in the same folder as the file that has the resource reference in, and the XAML file you are referencing has a resource of that name, then it should work.

Markus
Mar 20, 2013 at 5:15 PM
Markus,

The code runs. But it shows as a notification and if I try to edit while debugging, it insists I fix the problem first (which I can't.) So it's not a big deal, just an annoyance. But it would be nice to find a way to resolve it, if possible.

Thanks