Wpf Resource Merge question!

D.D.K-2637 966 Reputation points
2021-09-29T07:19:01.46+00:00

Hi, I'm having trouble using the resource dictionary on the client machine.
after building a basic Wpf form (just a few textboxes and buttons) , this form works fine on my personal computer.

However if I deploy it on the client I get an error like the image below:

       <ResourceDictionary>  
             <ResourceDictionary.MergedDictionaries>  
                 <ResourceDictionary Source="Library.theme.XP;component/Themes/System.Windows.xaml"/>  
                 <ResourceDictionary Source="Library.theme.XP;component/Themes/Library.Windows.Controls.xaml"/>  
             </ResourceDictionary.MergedDictionaries>  
         </ResourceDictionary>  

136128-image.png

I put these codes inside my form.xaml without implementing any templates.
After the form is displayed the button will apply the theme

On the client I have deployed MainAssembly.dll and Library.theme.XP.dll in the same folder but it still won't load.

Where did I go wrong? (Please let me know if anything is unclear. )

Thank you!

Developer technologies | Windows Presentation Foundation
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.