When I joined Microsoft in this role 3 years ago as of last month I was pretty much an AWT/Swing UI developer. I also did a lot with Delphi UI development with the version 7 RAD environment – starting with the TurboVision UI of Turbo Pascal (showing my age there). During all that time I always thought of the Windows GUI (3.0 and onward) and related material as not quite up to the whole UI development thing – 3.0 was originally just a DOS 6.2 cover to all of us. This was pure arrogant bias – I had been developing since the early 1980’s on everything from a Tandy TRS-80 and PET Computers and then the first Apple II and IIe’s, even the odd Micro-Bee (self built, of course) and I developed console apps and even (in the early 1990’s) my own GUI for my dad’s first GUI driven practice management system. I thought I was pretty good so when I joined Microsoft there was unhealthy dose of arrogance in all that view I carried.

On joining Microsoft I resisted questioning my views as the role I have is not focussed on development but rather strategy and architecture. But the developer in me rebelled and after about 6 months I started to have a look at the development stack; first with a little light talking to people (the likes of Andy Payne, Martin Grayson and James Kavanagh) and then more earnestly with some reading and study (and more talking to those 3). This has led me to a startling conclusion – I was wrong.

I have just finished reading from Matthew MacDonald called “Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition” and trying out a few ideas to get the whole WPF (Windows Presentation Foundation) thing. This morning it finally clicked!

Windows Presentation Foundation is a visualisation layer for applications. It can be driven in a number of ways. The XAML structure is my method of preference. It is also a way to separate many structural delivery levels of a UI – logic, style, structure, interactive response and access. Not only that but it is SOOOOO easy…once you get it.

The best way to demonstrate it, for me, is to show you by example. I got the idea to create my own clinical SOAP noting application (concentrating on the “SO” bits – Subjective and Objective).

What I want to show you in this sequence of WPF blogsis how easy it is to create the following:

image

What I am trying to do in this example is allow a clinician to collect info using a SOAP methodology against a Coronal Plane XAML graphic (Ventral view).

The process is that they select from “Cut” or “Pain” (etc) select the point and the noting element is displayed for entering notes with a line from the point they have selected.

So when the clinician clicks the point a textbox is added and a line is drawn in the colour of the button from the selected point to the added text box and the text box background colour is changed to reflect the type of selection.

Sounds simple, huh? Well it pretty much is.

Before we start into the blogs showing you how to create this for yourself let me just tell you that to create the basic [structural] mock up took about 15minutes – 10 minutes of which was creating the Venrtal body outline.

WPF – it just WURKS!