Wpf Resource Merge question!

DangDKhanh-2637 941 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!

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,676 questions
C#
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.
10,279 questions
{count} votes