Referencing a resource in a ResourceDictionary from a different ResourceDictionary in Silverlight?

Up vote 2 down vote favorite share g+ share fb share tw.

I have the following set of code in my App. Xaml: The NavigationPanel. Xaml contains a style that looks like this: The {StaticResource DarkBackground} is defined in the Brushes.

Xaml file (i.e. The first resource dictionary). It is defined as in the resource dictionary.

At runtime, I get the following error: Cannot find a Resource with the Name/Key DarkBackground Line: 16 Position: 44 The line numbers and position references the NavigationPanel. Xaml resource dictionary in the app.xaml. I can reference the brush from other controls, just not the included resource dictionary.

Why can I not reference or why does it not resolve the reference to a resource that is higher in the heirarchy of the merged resource dictionary? What am I missing here? C# silverlight xaml resourcedictionary mergeddictionaries link|improve this question asked Feb 29 at 6:47MIke S.617 86% accept rate.

If you are you might need to merge the Brushes resource dictionary into the NavigationPanel dictionary. So in the NavigationPanel dictionary.

I am marking your answer as correct, but I would love an explanation if you know why this is. – MIke S. Feb 29 at 20:20.

The Cosmopolitan / Metro project template has a good example of this...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions