When Windows Presentation Foundation (WPF) started to be shown at conferences, in magazines and so forth, much of the focus have been on the "flashy" user interfaces with a lot of 3D, video and animations. There was a good
article in MSDN Magazine that listed other benefits with WPF compared to today's platforms. I often heard many developers that doesn't believe that WPF is so interesting to them because their applications won't benefit from 3D, video and animations. This might have changed when
Silverlight was announced.
I've slowly started to read
Adam Nathans book
Windows Presentation Foundation Unleashed (only the three first chapter so far) and I have already noticed many things that I like. I thought that I should try to write some post about all this other things that WPF brings to the table. Triggers (mentioned in the MSDN Mag article) is something that I want to test before I talk more about it. The composability of the UI elements in WPF is a great concept and will make it possible to much more, without relying on third party tools or expensive custom drawing code. But I will start in this post to mention
Commands, which is something that VB3-6, Winforms have been missing (but I believe that MFC has it). In short commands means that you can assign a command to button that will be invoked when the button is clicked, and the command will also control if the button is enabled or not. This might not sound that exciting, but the good thing with commands is that you can assign the same command to many UI elements like toolbar buttons and menu items and so on. WPF also has quit many standard commands implemented like Copy, Cut, Paste, Undo, Redo, NextPage, Refresh, Zoom, MuteVolume and more. The overview topic of commands on MSDN can be found
here.