How to debug binding in WPF How to debug binding in WPF wpf wpf

How to debug binding in WPF


I am not sure about the cause of your problem but here are some links on How you can debug the WPF bindings -

How can I debug WPF bindings?http://www.zagstudio.com/blog/486(WayBackLink)

Debugging Data Bindings in a WPF or Silverlight Applicationhttp://blogs.msdn.com/b/wpfsldesigner/archive/2010/06/30/debugging-data-bindings-in-a-wpf-or-silverlight-application.aspx(WayBackLink)

WPF Snippet - Detecting Binding Errors
http://www.switchonthecode.com/tutorials/wpf-snippet-detecting-binding-errors(WayBackLink)

Debug Databinding Issues in WPF
http://www.wpftutorial.net/DebugDataBinding.html


Wpf catches binding exceptions so they won't normally trigger the debugger to break. You can have them always break by using the Debug\Exceptions menu command in VS, click Find, type the exception you are seeing (e.g. System.InvalidOperationException). Click Ok, and the dialog should scroll down to that exception. Tick the checkbox in the "Thrown" column and VS should then break on whatever line of code is throwing the original exception when you are debugging.

This will catch all exceptions of that type - even ones you are explicitly catching in a Try Catch block so remember to untick that box when you are done debugging or you'll end up wondering why VS is breaking on exceptions that are being caught.