This question is a result of a lunch-time conversation with a co-worker...I've read questions like WPF vs. Winforms...and I personally think that long term WPF is the way to go. The problem/question is what to do in the meantime.
Yes, WPF certainly has its advantages; not being built on GDI/USER is one of them. But at this point in time (i.e., late 2009; using VS2008 or perhaps even VS2005; Silverlight3 recently released and not yet widely adopted/deployed), WPF almost looks like it might be an "over engineered" solution. While I'm sure that will change with time, it doesn't make things any easier today, nor for the immediate (say <36 mo) future.
And let's face it, WinForms is really simple and easy; especially for the many co-workers who are still "happily" using MFC. Yes, it may be difficult to do slick animation, 3D graphics, gradients, etc.; but it's a very utilitarian solution that a lot of people (i.e., C++/MFC developers) readily understand today.
With that longish introduction--has anybody thought/tired/etc. about the idea of implementing (most of) WinForms using WPF (i.e., WinForms sans GDI/USER)? I'm sure given things like Control.Handle
, 100% re-implementation isn't possible. But it certainly seems like many WinForms controls could be re-implemented using WPF "under the hood". Or is this really border-line impossible?
By "re-implement", I envision removing assembly references to System.Windows.Forms replacing them with (say) Microsoft.Wpf.WinForms and then rebuilding my application. After that I would expect to fix some (relatively small number of) compiler and/or runtime errors (say P/Invokes to Win32 APIs).
Something like this seems like a nice complement to Microsoft's various WinForms/WPF interop strategies such as WindowsFormsHost. For example, developers could start to use/learn WPF in a much more incremental fashion.
Edit: While the various "why?" discussions are interesting, they don't answer the basic technical question: "yes., ..here's how....; or no, ...because...".