12

Is it possible to migrate a VB.NET Winform solution to a 3.5 WPF solution. If so, any suggestions how to do it?

Thanks in advance! JFV

3 Answers 3

15

Microsoft is doing everything for us so that we have to throw away everything we've written 2 years ago. According to Josh Smith,

Is there a way to convert Winforms application to a WPF application?

No. Those two UI platforms are very different and there is no app which converts a WinForms app to a WPF app. Of course, this will not prevent you from reusing any business/DAL/logging/Ioc/etc libraries you use in WinForms.

However, you might want to check out this, quite basic but functional WinForms->XAML converter, written by Rob Relyea from WPF & Xaml Language Team.

According to him,

"We (Microsoft) haven't built a real converter because we think most people will not just move over controls, but often will rethink their application as they move it. We'd love feedback..."

Also, you might want to check out Guidance for migrating an app from Windows Forms to WPF, also by Rob Relyea.

3
  • Thanks for the info and the links! Looks like I'll be re-writing most everything from scratch again, but at least I won't be wondering if there is an easier way... Thanks! JFV
    – JFV
    Commented Nov 24, 2008 at 20:44
  • @JFV - you are welcome. I just want to warn you that I don't know anything about this topic really...I just googled it to be honest..... but I believe in what Rob Releya says... Commented Nov 24, 2008 at 20:55
  • last link is dead. See archive: web.archive.org/web/20100929142258/http://…
    – schmijos
    Commented Nov 21, 2012 at 7:41
7

Straight answer is a big No.

If you want to take all the real power of the new platform, you need to rebuild the entire Win forms UI side and most of the associated code for effective data binding and User experience. Your DataLayer can be reused fully in WPF.

You can check plenty of questions asked on the same

What is the easiest way to upgrade a large C# winforms app to WPF

What are the bigger hurdles to overcome migrating from Winforms to WPF?

2
  • 1
    sometime bad news is best delivered directly :)
    – JaredPar
    Commented Nov 24, 2008 at 2:41
  • Thanks for the additional links, they were very helpful!
    – JFV
    Commented Nov 24, 2008 at 20:47
2

There is now a project that does exactly what you ask for. See Windows Forms to Windows Presentation Foundation Converter. Also, see the video.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.