More on dependency properties

David asked why dependency properties don't use generics.  Honestly, once we looked hard at it, we didn't see a great deal of gain, certainly not enough to justify the cost of making the change to all the people using DP's.  If you're calling through the CLR wrappers (and we strongly encourage the use of CLR wrappers), there's not that much programming model benefit to generics.  "checkbox.Checked = true" looks the same with or without DP<T>, and it still beats checkbox.SetValue(CheckBox.CheckedProperty, true).

There wasn't really a performance win, either, because the property engine has to box all these values anyway to provide storage for all the properties.  And there was even the possibility of a performance regression because of extra codegen that sometimes happens with generics.  Probably overcomable, but at the end of the day, seemed a lot less important than other things we could improve on.

We're always on the lookout for ways to improve the declaration of dependency properties.  One thing that helps is a Visual Studio 2005 feature called "snippets", which is great for writing boilerplate code.  The "propdp" snippet is part of the May CTP of "Fidalgo" (I can't even begin to keep track of the public name for that one -- Visual Studio Extensions for WPF?  Something like that, it's the same package that provides the schema for xaml)