Convert WinForm to Wpf

Possible duplicate:
Porting VB.NET 2.0 Winform to 3.5 WPF

Can I convert an entire WinForm application to a wpf application ?. I want to convert my accounting software to Wpf. Is it possible.

+7
source share
3 answers

No - there is no direct translation from Windows Forms to WPF - moreover, direct execution of this will be bad and lead to a very poorly developed WPF application.

I will talk about this in detail in my WPF series with MVVM - in particular, β€œPart 3” shows what happens when you write WPF in the same way as regular Windows Forms applications, but then I will explain why this is a bad idea.

WPF, in essence, is built on a completely different software paradigm than Windows Forms. It would be better to split your business logic in Windows Forms and then write a new View layer in WPF to work with the logic.

+16
source

Unlike converting vb.net to C # or something else, WPF is a completely different way to write Windows applications.

However, if you have clear, abstracted code and / or your user interface code is separate from the logic, you should not worry too much about porting it to WPF.

WPF also has a WindowsFormsHost class. The following is a step-by-step guide on hosting window form management in WPF .

+1
source

you need to rewrite quite a lot. And it's definitely worth doing to take advantage of MVVM.

0
source

All Articles