views:

97

answers:

1

Hi,

I have a project that i started as a WinForms application as that was the format i was confortable with at the time. I have since started dabbling in WPF an introduced some WPF UserControls (mainly grids) into my project and absolutely love them. The question i have is, is there any real advantage to me changing the UI Project of my solution into a purely WPF project, and get rid of any WinForms? I am fully aware that each format suits a certain environment, and you wouldnt be able to give a definitive answer without knowing more of the details, but i would like to know peoples opinions, and if anyone has done a silimar thing of converting an existing WinForms App into a WPF frontend, and any observations they made in doing so.

Thanks

+1  A: 

Hi,

Underlying the new features in WPF is a powerful new infrastructure based on DirectX, the hardware-accelerated graphics API that’s commonly used in cutting-edge computer games. This means that you can use rich graphical effects without incurring the performance overhead that you’d suffer with Windows Forms. In fact, you even get advanced features such as support for video files and 3-D content. Using these features (and a good design tool), it’s possible to create eye-popping user interfaces and visual effects that would have been all but impossible with Windows Forms.

WPF enhances features that appeal directly to business developers, including a vastly improved data binding model, a new set of classes for printing content and managing print queues, and a document feature for displaying large amounts of formatted text.

But if you’ve done a substantial amount of work creating a Windows Forms application, you don’t need to migrate it wholesale to WPF to get access to new features such as animation. Instead, you can add WPF content to your existing Windows Forms application, or you can create a WPF application that incorporates your legacy Windows Forms content.

Reference: Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition

Archie
Thanks @Archie. So i could do the reverse of what i have at the moment, and include WinForms controls in a WPF frontend. That sounds promising.
Ben
Could you provide a link on how to use Winforms inside a WPF App?
Tigraine
Try [this link](http://msdn.microsoft.com/en-us/library/ms753178.aspx) for a starting point with lots of links about the WPF interoperability topic, and [this link](http://msdn.microsoft.com/en-us/library/ms751797.aspx) for details specifically about WinForms/WPF (also included in the link list from the first link).
gehho