views:

33

answers:

3

I have been using data binding for several years with win forms, but now with more rich and full featured data binding in wpf I can easily do stuff that would have taken a lot of code in winforms. Lurking beneath the surface is an unsettling feeling that all of this is a little to automagic and that if I break something I may not be able to put Humpty back together again.

So my question is when you run into data binding issues what from a debugging/ diagnostic perspective can be done. Are there hooks into the process that I am unaware of or is too fool proof to need this level of deconstruction.

As an answer to another question someone pointed me to this blog post which has some of the suggestions that the answers posted.

http://bea.stollnitz.com/blog/?p=52

+2  A: 

Interesting question. I use databinding a lot in WPF, and fortunately I haven't ran into much issues.

http://www.codeproject.com/KB/WPF/debugwpfdatabinding.aspx

Never thought to look into debugging, but here's an interesting codeproject that covers the topic.

And here's another article: http://bea.stollnitz.com/blog/?p=52

I'll have to look into both of those further.

townsean
+2  A: 

Start with this blog by Bea Stollnitz. I prefer the converter way for really tough ones, I keep a debug converter snippet handy all the time - and even compile it in to debug builds of most wpf projects in case I ever need it.

Philip Rieck
A: 

I found Snoop very useful in figuring out Binding issues. http://blois.us/Snoop/

It is pretty intuitive. It allows you to filter the list of controls having binding issues. You can delve into the Binding expression, change it and see if that fixes things.

SKG