Binding errors in debug output for nested controls

Nov 30, 2011 at 10:18 PM

Just to make sure I'm not doing anything wrong, but when I my controls first load up I get a spew of data binding errors in VS debug output.  I assume this is from the views datacontext being initially bound to the model before UserControl<> can swap it out for the viewmodel that it built up?

If so is there a way to suppress these noisy errors in case I have real data binding errors I want to see?

Coordinator
Dec 1, 2011 at 6:24 AM

The issue is that WPF and Silverlight do not allow to change the initial DataContext before the DataContext is constructed. In the case of a UserControl<>, in most of the scenarios the view model is determined based on the actual datacontext, thus then you will indeed get the binding errors.

I have created an issue, and will think of a solution:

http://catel.codeplex.com/workitem/7043

Probably the default listener will have to be removed and the Catel logger will now output the actual binding errors, but that is something for 2.5 (we are going to release 2.4 very soon).