wpf - Set resource or style to a window from different class library -


I'm following the prism to create a WPF application. In my application, there is an assistant class library where I have been defined resources and styles which are being used by many classroom libraries in the solution.

But when I try to set the resource to a window's style attribute, I get an error. The window is in the differnt class library as a source.

The error I am getting is: 'resourceource {name} resource not found' resource names are case sensitive. Error on the object 'Myvindo' in the markup file

I have used the following code but it is not working

   & Lt; /ResourceDictionary.MergedDocs> & Lt; / ResourceDictionary & gt; & Lt; /Window.Resources> & Lt; / Window & gt;    

You use a pack URL to get a resource dictionary from another assembly You can. check.

Here is an example of a Resource Dictionary from a General assembly:

  & lt; application. Resources & gt; & Lt; ResourceDictionary & gt; & Lt; ResourceDictionary.MergedDictionaries & gt; & Lt; Resource source source = "pack: // application:;; / common; component / styles.xaml" /> & Lt; /ResourceDictionary.MergedDocs> & Lt; / ResourceDictionary & gt; & Lt; /Application.Resources>    

Comments