tags:

views:

241

answers:

6

Well we are considering to move from WinForms to WPF, what pitfalls does WPF have? And we got component one's flexgrid is there any wpf grid that has the same functions? one nice thing with it is that you can implement your own draw method for the cells... It can merge cells print and save to many file formats..

+2  A: 

First of all, WPF works pretty different from Windows Forms and likely requires a different approach on how to structure and design the application. At least it works way better if you do it the way it was conceived.

As for single Windows Forms controls, this shouldn't be a problem. There is a WindowsFormsHost which enables you to include Windows Forms controls in WPF.

Joey
+1 for the windowsformshost
Dabblernl
A: 

Take a look here for a datagrid: http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29117

The main hurdle with WPF is simply the huge amount of new stuff to learn (if you wish to use it properly). I'd think twice if you're on a tight schedule, but it might be worth it if you have 6 months to spare...

AndrewS
It's not just the amount of new stuff, but the deep structural differences between WinForms and WPF e.g. the heavy use of data binding and the pivotal role of templates instead of custom controls.
itowlson
That was my (poorly delivered) point; you have to learn new techniques and how to apply them.
AndrewS
+5  A: 

In general, WPF development is very different from WinForms. You should expect it will take some time to learn the new technology (or you might even need to hire new developers =)).

WPF approach is in many ways better than WinForms' one: check out styles and triggers, data binding, control templating, eventing model.

I would recommend you to start exploring it, but wait for the WPF 4 (and the boring MSDN page) to start the actual migration, because it is going to be even better and close some of the very annoying gaps.

Yacoder
+1, good point on annoying gaps, do you know a date for WPF 4?
Ash
I thought it's released together with .NET 4, isn't it?
Yacoder
@Ash - VS2010 / .NET 4 (including WPF 4) will be released in mid-April '10
Richard Szalay
+1  A: 

The learning curve is slow to get going, but once you get the idea it all starts to make sense. We have "Pro WPF in C# 2008" book floating round the office and its been a great help. Of course most things get googled to find an answer, but to find out why something is done the way it is this book was a great hope - to me anyway.

There are some annoying features but its still WPF is still quite new. Like most things, if you come across a problem someone has likely come across it before and there is an answer out there!!

J

Jay
+1  A: 

The change from winforms to WPF is not a change I'd reccommend unless you have specific requirements which WPF fulfills - WPF is not intended to be a replacement, simply an alternative which is more suited towards graphically rich applications.

If you do have a specific requirement then you also might want to consider embedding WPF controls into winforms applications, rather than converting your entire application.

Kragen
well its not that we will convert the current applications its more when we start new applications.
Petoj
Not just for "graphically rich" applications -- even for ye olde battleship grey apps, WPF pays off with a stronger architecture (decoupling code and UI) and the ability to easily do simple things (like templated lists) which are a major effort in WinForms. (But at the expense of missing some important controls so you incur effort obtaining or writing replacements.) Good point about incremental migration and interop though!
itowlson
A: 

Speaking from just my experience, moving from Windows Forms to WPF took some re-learning. A few months into the transition most changes made total sense. WPF removes much of the frustration associated with using Windows Forms. It allows for a truly rich UI development experience especially when working in tandem with designers. I strongly recommend WPF Illustrated by Daniel Solis as a learning aid.

With reference to the grid, Syncfusion offers a WPF grid control that implements the features you have asked for. It implements true virtual mode with cell level customization, printing and export to multiple formats including Excel. Disclaimer - I work for Syncfusion.