Skip navigation.

Archives

Implementing DependencyProperty with a single attribute (and CciSharp)

In WPF, one needs to implement the DependencyProperty pattern to make properties bindable. It usually involves a lot of boiler plate code:

  • adding a static field that names the depency property,
  • adding the instance property to the type (and make sure you follow the naming convention),
  • add validation methods and wire them in the dependency constructor

These are a number steps that need to be done again and again if you are building new WPF controls.

Using Moles to test DateTime.Now on Channel9

We did a super-short movie with Nikolai Tillmann on how to use Moles to test code depending on DateTime.Now. Enjoy!

image