Visual Studio 2008 and WPF
430 words.
I’ve started migrating to Visual Studio 2008 and .NET 3.5 for my home projects, for whatever that’s worth. (We aren’t allowed to use it at work.) Nothing in my projects actually require .NET 3.5 features, mind you, so it’s not that great of an experiment, but hey, it’s a start.
So far, I find that Visual Studio 2008 is not much different from 2005. The experience on Vista is improved a bit, but beyond that there’s hardly any changes in the day-to-day features that I typically use (which, admittedly, are plain old boring C# 2.0 features). It’s not at all like the change from 2003 to 2005, which was pretty dramatic. I guess the changes will become more apparent when I start building new-fangled WPF, WCF, and/or WWF projects.
Speaking of which, as an experiment, I started porting one of my old .NET WinForms apps over to WPF (the app is basically a customized picture viewer for my genealogy picture collection). So far, I’d have to say it’s a very frustrating experience. I fail to see why Microsoft needed to change all the methods and properties for the entire API. Here’s just a sampling of the changes:
- It’s not Label.Text anymore; now it’s Label.Content.
- It’s no longer TreeNode.Text; it’s TreeViewNode.Header (yeah, that makes sense).
- TreeNode.ImageIndex is gone entirely; now you have to roll your own tree view images.
- TreeNode.FullPath is also gone entirely.
- Multithreading fans should know that Invoke() has been replaced by Dispatcher.Invoke().
- And remember how you could click the handy yellow lightning bolt on the Properties window and see the events a control supported? Well now you have to go into the XAML and bring up Intellisense to see the events.
Note to Microsoft: It’s very frustrating when you can’t learn a new technology by simply adding onto your experience with an old technology. With WPF, it’s almost like starting from scratch.
But annoyances aside, there is a certain amount of appeal in building application interfaces out of HTML-like syntax. Interface design is one area of development where I don’t mind declarative syntax at all. And I’m certainly not alone on that. Throughout history, nobody has ever liked building interfaces using calls to the native APIs. That’s why there’s always a booming industry in GUI-building tools and libraries. Even way back in the olden Amiga days, they were everywhere. I even wrote one myself that expressed interfaces in an object-oriented, declarative sort of format. WPF just looks like the latest step in that long tradition.
I’ll be posting more about my adventures in porting this app to WPF.
Sorry, new comments are disabled on older posts. This helps reduce spam. Active commenting almost always occurs within a day or two of new posts.