Dipping a toe into WPF

 

I’ve spend most of this last week mucking around in Expression Blend (Microsoft’s Layout tool for their new UI API WPF).

Old Hand Adds Display New Hand Adds Display

The screens above show the fruit of my labor, it’s a non-interactive screen which displays products that have to be hand tipped into the batches of product we make here at the feedmill.

The old one (to the right) was a simple rich text control which read in the contents of a text file generated by the process control system, it coloured everything from the bottom to the first “%” character in the text in blue to signify the active batch.

The new version reads in a new XML formatted text file (watched by a “FileWatcher” object)  into a typed dataset, manipulates the data a little to weed out anomalies and to regulate the timing, then generates an “ObservableCollection” of objects from the resulting dataset which gets bound to the WPF window.

So it’s a bit of a weird blend of the newest of the new and the crappiest of the old, text file integration is a bloody nightmare… you should see the hoops I have to jump through in the code to smooth out the missing bits.

After my first week of WPF I think it has a lot of potential but I don’t think the first version of the tools are quite ready for prime time.

Leave a Reply

Your email address will not be published. Required fields are marked *