Hi all. I have a WPF application that has a variable "x" which is an instance of a class from a custom C# assembly called "MyClasses.dll". This variable "x" has a method "LaunchForm" that launches a Windows Form "Form1" from another assembly "MyForms.dll". The form is launched as a dialog and shown in the screen but the current Windows XP / Win7 theme/skin is not applied to it. If this "Form1" is launched from a Windows Form (not WPF window) it is shown correctly though. Any ideas why this is happening? Any hints to solve this issue?
Cheers all! Edgar
I just looked at the code again and I'm not using reflection on this way of launching the winform. The code as requested is in WPF:
MyInterface x=new MyClass1(); x.LaunchForm();
The code in MyClasses.dll:
public class MyClass1() : MyInterface { public MyClass1() {} public void LaunchForm() { Form1 Form1Dialog=new Form1(); Form1Dialog.ShowDialog(); } }
This, as mentioned, launches the winform from WPF but no windows theme is applied to it.