Our flagship application is a hybrid of VB 6.0, ATL and straight C++ and we are well into the development of a new version that will have many UI enhancements. Since it is a major realease and we have some time available we decided to use WPF. In a way it will help us future proof the UI by synchronizing with Microsoft’s own direction. This is all good but after spending nearly all day trying to make the WPF’s ListView match the behaviour of a WinForms or VB 6.0 ListView with CheckBoxes I am starting to have doubts about the whole thing. I can’t bring myself to ditch WPF completely as some of the features are pure goodness but there are two areas that are letting it down big time. First is the absence of all the controls available in WinForms and second is the performance and usability of the WPF designer.

Build your own?

Looking through the newsgroups it seems that the standard response to my first point is that it is very easy to put together complex controls with WPF. So if you need, like I do, a ListView with checkboxes then just build it. This does not fly because replicating all the behaviours that are expected is not trivial. I found a very good post that does just what I need here. This blog entry is very well put together and the code works. I managed to add a fully data-bound ListBox with CheckBox support in a few minutes. But then my ListBox needs to support the checking and un-checking of multiple items simultaneously. No luck. I will have to do it myself. Probably not very difficult even with the data binding code but contrast this with a simple drag and drop of a control onto the WinForms design surface and some bog standard .NET code. The latter is a much better development experience and a lot less code for me to debug and test. The solution is to host the WinForms but I find myself reverting to this solution too frequently with all the problems that this brings.

Slow going

The second problem is the WPF designer and to some extent Visual Studio. I have two main development PCs, one is an x86 running XP and the other an x64 running Vista x64. In both of them Visual Studio has a very decent performance except in it comes to the WPF designer. There are frequent hold ups and even a crash every now and then. It is usable but barely. Ten years after VB 6.0’s “death” Visual Studio designers aren’t still as responsive and stable as they were then. I don’t know what to make of this. The solution has been to drop the designer and use XAML which is very inefficient since I have to compile the application every time I need to see the resulting UI.

I don’t want this post to be gratuitous bashing but I am struggling and so are many other developers out there. I hope this helps the Visual Studio/WPF teams understand the real problems we are facing and maybe get some relief in the form of a Service Pack.