I have a WPF application which I need to integrate with WinForms. As suggested in some forum, I removed window1.xaml and app.xaml from my project and then changed the project type to class library. After that, when I add the DLL reference in my WinForms project I get an error ‘Provide value on ‘System.Windows.StaticResourceExtension’ threw an exception.’
What is the reason for this?
Also since I use resource dictionary, I was adding all resource dictionary references inside merge dictionary in my app.xaml. Now only with user control how would I do this??
Also one more exception that I observed is ‘Provide value on ‘System.Windows.Markup.StaticResourceHolder’ threw an exception.’
Thanks in advance…
Well i converted my wpf app to DLL by removing app.xaml and window.
Make sure that if you are using ResourceDictionary files then each user control should have a reference to it as merged dictionary and since each such reference is local to its own user control if there are nested user controls i.e, user control in a user control all user controls should have a reference to resource dictionary files.