Do one thing, and do it well [Tip: The CLR wrapper for a DependencyProperty should do its job and nothing more]

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of

See you there!

Comments (5)
  1. mstrobel says:

    Seems like it ought to be obvious, doesn’t it?  And yet, every once in a while, I come across some code where someone added logic to their DP accessors, and I die a little inside.

  2. David Anson says:

    Mike Strobel,

    🙂 From now on, my plan is to send a link to this post instead of typing up a separate explanation each time.

  3. Love it. Tell the world!

    (I am the WPF SDK writer who wrote the original versions of the two topics you link to, and currently own the equivalent topics in the Silverlight docs too. 🙂 )

    It is worth noting that WPF in .NET4 still has this behavior, despite the v4 WPF XamlLoader being based on a Xaml Services XamlLoader base class that has NO errrr dependency on the dependency property system. The call-property-system behavior is a big performance win for WPF XAML parsing. In a big-picture view of things, the v4 WPF XAML loader overrides base implementation that would have otherwise acted on the CLR wrapper, and thus uses at least part of the v3x behavior.

  4. Where I say XamlLoader in above, substitute the real name of the class, XamlReader (doh).

  5. David Anson says:

    Wolf Schmidt,

    Very interesting info on WPF 4, thank you! And stay tuned, the next few posts are fairly related and may link to other documents you’ve written… 🙂

Comments are closed.