We can all see Runtime BindingExpression errors in the Visual Studio Output Window. But can we capture these events in the running app itself? I'm hearing about WPF tracing... does this have something to do with this facility? Also, the System.Windows.Data namespace contains no documented events (like a BindingExpression error event), why?
3 Answers
The answer to your first question is "not really."
[There was a blog post from 2009 that went more into the details of debugging this situation, but it no longer exists and so the link has been removed from this answer.]
3 Comments
Actually, that is not exactly true. Yes the binding logic is dynamic, and its in its own pipeline that is hard to follow. BUT, I found this great blog entry from Jason Bock.
http://www.jasonbock.net/jb/Default.aspx?blog=entry.0f221e047de740ee90722b248933a28d
TL;DR: Jason has a class that can provide the method of capturing any binding errors as an event.
Comments
Yes you can capture those events using WPF Tracing. This is explained well in this answer. In fact I would suggest closing this question as a duplicate of the other.