Take the 2-minute tour ×

Are there any utility or converter to convert XAML WPF window to .Net 2.0 Windows forms form?

share|improve this question
i don't think there are any.. and even if there are.. i wonder how could they flatten the control hierarchy of WPF to winform controls... –  Shekhar_Pro Feb 15 '11 at 18:54
You're right, but i need the basic layout, or the 'figure' –  Mohamed Sakher Sawan Feb 15 '11 at 18:58
Couldn't you simply embed your WPF control into WinForms' windows using ElementHost ? –  digEmAll Feb 15 '11 at 19:00
But the problem is that i'm using .net 2.0!! :) –  Mohamed Sakher Sawan Feb 15 '11 at 19:04

2 Answers 2

up vote 3 down vote accepted

No, and there's unlikely to be anything like this; WPF and WinForms are disparate frameworks, a WPF UI can't really be converted to a WinForms UI due to differences in UI composition, layout differences, different positioning systems, etc.

share|improve this answer
I see, the main reason is the different composition way in WPF, but i need a utility to give me a rough WinForm contains the controls in the nearest way they are in the WPF window –  Mohamed Sakher Sawan Feb 15 '11 at 19:21
I'm afraid there's nothing like that to my knowledge, and I tend to be privy on these sort of things. –  Judah Himango Feb 17 '11 at 15:52

There is no tool to convert it across. It might be worth using an ElementHost to load WPF components in WPF, that way you don't need to convert and can re-use WPF components. If you have a WPF window you would need to convert this to a UserControl to work.


.Net 2 code to load WPF control

    string dllPath = "C:\\ProjectsTest\\TestSolution\\ActiveXUser\\bin\\Debug\\TestControl.dll";
if (!File.Exists(dllPath)) {

string versionInformation = null;
versionInformation = Environment.Version.Major.ToString() + Environment.Version.Minor;

Assembly loadedAssembly = Assembly.LoadFile(dllPath);

Type[] mytypes = loadedAssembly.GetTypes();

Type t = mytypes[1];
Object obj = Activator.CreateInstance(t);

versionInformation = Environment.Version.Major.ToString() + Environment.Version.Minor;
share|improve this answer
But the problem is that i'm using .net 2.0!! : –  Mohamed Sakher Sawan Feb 15 '11 at 19:05
ahh. There's a solution on here –  Tom Dudfield Feb 15 '11 at 19:08

Your Answer


