Thursday 29 October 2009

Code Snippets for INotifyPropertyChanged

The INotifyPropertyChanged interface is one of the mechanisms available to update WPF bindings when a property value changes.

If you work with the Model-View-ViewModel pattern, you probably implement INotifyPropertyChanged in your ViewModel classes.

To help myself create properties with support for INotifyPropertyChanged, I created a couple of simple code snippets with literal replacements for the property name and type.

Click here to download and install the snippets.

Tuesday 6 October 2009

Step-by-step Shiny Button Template with Expression Blend 3 – Part 3

Introduction

This is the third of three posts showing how to use Expression Blend 3 to create a shiny button template for WPF and Silverlight.

Part 1 Creating the static template (WPF and Silverlight)

Part 2 Adding transitions using triggers (WPF only)

Part 3 Adding transitions with the Visual State Manager (Silverlight and WPF)

In part 1 we created a static template that was applied to the button shown below:

final static button

In this part I’ll walkthrough adding different visual states and animated transitions using the Visual State Manager (VSM). I’ll be working with a Silverlight project, but the same steps should apply using the VSM with WPF.

Sunday 20 September 2009

Step-by-step Shiny Button Template with Expression Blend 3 – Part 2

Introduction

This is the second of three posts showing how to use Expression Blend 3 to create a shiny button template for WPF and Silverlight.

Part 1 Creating the static template (WPF and Silverlight)

Part 2 Adding transitions using triggers (WPF only)

Part 3 Adding transitions with the Visual State Manager (Silverlight and WPF)

In part 1 we created a static template that was applied to the button shown below:

final static button

In this part we’ll be creating different appearances for various button states, and animating some of the transitions between states.

Sunday 13 September 2009

Step-by-step Shiny Button Template with Expression Blend 3 – Part 1

Introduction

In this step-by-step walkthrough I’ll be showing you how to use Expression Blend 3 to create a template for shiny round buttons somewhat like the play button in Windows Media Player or the back and forward buttons in Internet Explorer.

The tutorial is split over three posts:

Part 1 Creating the static template (WPF and Silverlight)

Part 2 Adding transitions using triggers (WPF only)

Part 3 Adding transitions with the Visual State Manager (Silverlight and WPF)

The resulting template can be applied to standard WPF or Silverlight Button controls and styled with different colours to create buttons like these:

example buttons