Why Windows Presentation Foundation? (WPF)
May 08 2009 / 17:05
For those who are in doubt whether WPF (Windows Presentation Foundation) is any advantage for making nice and user friendly interfaces, let me say this: WPF is cool! At least that is what my experience is after developing with it for a couple of months now. The project we are working on is a smart home system that will run on touch screens and pc’s. It has to be very user friendly and dummy-proof yet have a lot of functionalities like controlling the temperature, lights, shutters, plugs, …
To start with, you can do everything in WPF what you do in the classic forms application. WPF does a lot more things on top of that, which is actually features to adjust the look & feel for your user interface. If you are only developing with the standard .NET controls and the standard colors without animation, you will most likely not see any advantage in WPF. But if you want to have custom buttons, add animation and transitions between different forms, you would be a lot faster with WPF.
In the start of the smart home project we were looking at all possible technologies with their advantages and disadvantages. The last 2 that remained was Adobe Air and WPF. Air (or Flash) has the advantage of being very flexible in terms of layout and animation. You can create as good as anything visual in Flash. Disadvantage is the poor developing and debugging tools, especially if you compare it with Visual Studio. On top of that we would have to do all the communication with the main controller (serial and tcp communication). With WPF, we could just import the Illustrator drawings (like we would do in Flash), use them as objects and animate them like we would animate them in flash CS4. And ! we have the powerful .NET framework with SQL server express behind it. At least, that was what we thought when we started with it.
Now, after some months of developing, animating and styling with WPF I have to even add advantages to WPF to Flash. The fact that you can structure everything in XAML files and directories gives you a better overview of the project. Since everything of the user interface is described in XML (XAML that is) you can easily adjust, add and modify almost everything.
My goal is to elaborate a bit more about some features of WPF later ;) In case you want to experiment with WPF you can download some tools from the Microsoft site:
If you want good design feedback and tools, you will need Expression Blend (trial) http://www.microsoft.com/Expression/products/Overview.aspx?key=blend
To start with a simple WPF application, you will need Visual Studio. The express editions are for free:
http://www.microsoft.com/express/vcsharp/Default.aspx
If I can help you getting started, feel free to contact me ;)
Posted by
Pieter-Paulus Vertongen
WPF