Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
4.38/5 (4 votes)
Is there any way to Convert WPF applications into Windows Form Application
Posted
Comments
Richard MacCutchan 6-Apr-15 4:10am    
Yes, but it will take quite a long time. And not all features of WPF are directly convertible.
Ziee-M 10-Apr-15 12:35pm    
If possible, can you explain the need to move from WPF to Windows froms?

That's not really a good idea.

But essentially you can reuse your code behind in most parts and will have to rewrite the UI. If you seperated logics from presentation you should already have a business layer and the change is not that difficult.

If you didn't and have a so-called fat client, i would recommend the step one is to identify everything with logics, data retrieval etc and move that to a library assembly at the very least (if not a seperate tier, which for logistics and updateability would be better,) once that is done, your UI is just presenting and interacting and the process of building the UI is pretty straight forward.

I dare say, though, that these years the process is normally in reverse the move to wpf which also, generally is something which is adviced against ;)
Zero value-adding pile of complexity.

But moving the logics to seperate anchoring will enable you to build another UI and easily maintain both platforms in the transcision phase.

hope that helps
 
Share this answer
 
No, not really because WPF and Windows Form Application handle their form differently from each other. You may have luck finding one of those Code converters, i have seen visual basic to c# and so on not a specific one for WPF to Windows Form. WPF is heavier on the graphics and therefore uses bit different methods to execute your code, it allows better design of the GUI while your regular windows form is unable to do what WPF can. However your code can still be executed but you have to physically create new project using windows form and paste your code to over.
 
Share this answer
 
Comments
sreeyush sudhakaran 4-Aug-15 3:34am    
See Here : http://stackoverflow.com/questions/5008082/convert-xaml-wpf-window-to-winform
Converting WPF to WinForms is not trivial, there is certainly no automated way, and if you want to go back to .net 1.1 as well you'll lose a whole load of other features like generics etc, so it's not just the UI you'll be changing.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900