public DataContextSpy() { // This binding allows the spy to inherit a DataContext. BindingOperations.SetBinding(this, DataContextProperty, new Binding()); this.IsSynchronizedWithCurrentItem = true; }