I just blogged about my new DataContextSpy class, over on my other blog. It uses Hillberg’s Freezable trick to gain access to an inheritance context from an object that is not in a logical tree. DataContextSpy is very simple, so it should be reusable in many scenarios.

I hope eventually Microsoft provides a first-class addition to WPF that makes it easy to create an artificial inheritance context. Having to rely on that strange aspect of Freezable is kinda…


…though it’s great to have in the toolbox. 😉

4 Responses to DataContextSpy

  1. Sam Jack says:

    I created an issue on MS Connect about this (

    6 days ago it was marked as closed. Is this good or bad? You decide.


  2. Josh Smith says:


    I’m surprised that they closed the issue without even leaving a comment. What’s up with that?


  3. S Britz says:

    I believe the correct spelling is….


  4. Josh Smith says:

    Indeed! 😀

%d bloggers like this: