WinForms 2.0: Still the Bastard Child of .NET Development

You know, there are some great new WinForms controls in .NET 2.0. It's obvious that Microsoft has spent a lot of time making WinForms better than it was in 1.X. But having spent the last several days building WinForms 2.0 demos, I'm extremely frustrated at the holes that are still all over the place. Maybe I'm just dumb and don't know what I'm doing, or maybe I really do need a college degree to do this stuff, but some things that are supposed to be intuitive are anything but. Just a few of my frustrations (please jump in if you know the answers to any of these):

  • MenuStrips and ToolStrips are cool, but for the life of me, I can't figure out how to assign an ImageList to a ToolStrip to be able to set the ImageIndex property
  • You can't DataBind to a TreeView or ListView control
  • You can't get a TreeNode by name or text
  • You can't use an XML file as a DataSource without infering a schema and converting that to a DataSet
  • You can't create a new SplitterPanel in memory and substitute it for another at runtime with the SplitContainer control
  • You can't layout several bits of information in a ListView control (to have an Outlook-like mail items UI) without some serious OwnerDraw overriding

WinForms 2.0 is still severely lacking on discoverability. Why is it that the same controls in WebForms are far more advanced than the ones in WinForms? I mean, come on... I can't databind an XML file to a TreeView? Am I the first one to ever try that scenario? I highly doubt it. I shouldn't have to get an Infragistics control to DataBind a frickin TreeView. Seriously.

Don't get me wrong, many of the other changes are awesome. I know you guys have worked hard. But I thought I was building a "rich experience" on the desktop. I can't do that when the web version has more of the basics nailed than the Windows version does.

If WinForms development at Microsoft is being forsaken to flesh out Avalon, I'm gonna be severely pissed if some of these basics are missing when Orcas comes out.

Bottom Line: The built-in WebForms controls are head and shoulders above their WinForms brethren.

</rant>

3 Comments

  • I too have been baffled by the whole &quot;databinding to XML&quot; thing for a while now; writing to an .xsd and then running xsd.exe, then adding the class to the project seems like a total PITA. Seems like that could all be done behind the scenes. Here's to asp.net :-).

  • I agree, the data binding story in WinForms is terribly. Another one that doesn't work: CheckedListbox. Essentially this half baked support made me not use data binding in the first place, because there were too many controls where I would have to write custom data binding code myself. I had a look at Avalon last week and have to say that the data binding story there is just beautiful, the most powerful and complete thing I have ever seen in that space.

  • Thanks for the help Frans. I'll keep an eye out for that.

Comments have been disabled for this content.