Windows Presentation Framework, first look

I had my first real play with the Windows Presentation Framework (WPF). The first thing that struck me is how like the web model it is. For example, through the use of various services it provides the cascading down of properties and the bubbling up of events. So you can mark a grand-parent property, e.g. color, and if any child node doesn’t specify a colour they’ll automatically have their parents colour value. Similarly the event model is like the web.  You  fire an  event in a child element and the event can bubble up through all of its ancestors, any of which can handle the event.

I only managed a very quick play with the beta Visual Studio Add-in, created a quick "hello world" style application from a button click. I’m not sure if it’s a clumsy beta or it going to work this way but I didn’t get my nice event handler template by double clicking the button. Oh no, I had to guess at event handling code (almost identical to the usual one) and guess where in the Xaml I had to add the click attribute to wire-up the event. But it worked and I hope to have a longer play soon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s