Debug and trace the WPF data-binding

Recently, I had a problem with a data-binding implementation. I met this class by googling. You might need it for debugging data bind operations as I did.

Here is my simple code snippet. It uses a TextBox and TextBox displays a Person instance named ‘Kaan’.


    
        
    
    
        
            
                
            
        
    

If you hit the F5, you will get Highly detailed binding information on your debug window as below.

System.Windows.Data Warning: 54 : Created BindingExpression (hash=1661449) for Binding (hash=7785776)
System.Windows.Data Warning: 56 :   Path: 'Name'
System.Windows.Data Warning: 58 : BindingExpression (hash=1661449): Default mode resolved to TwoWay
System.Windows.Data Warning: 59 : BindingExpression (hash=1661449): Default update trigger resolved to LostFocus
System.Windows.Data Warning: 60 : BindingExpression (hash=1661449): Attach to System.Windows.Controls.TextBox.Text (hash=60110025)
System.Windows.Data Warning: 65 : BindingExpression (hash=1661449): Resolving source
System.Windows.Data Warning: 68 : BindingExpression (hash=1661449): Found data context element:  (OK)
System.Windows.Data Warning: 76 : BindingExpression (hash=1661449): Activate with root item Person (hash=11550047)
System.Windows.Data Warning: 106 : BindingExpression (hash=1661449):   At level 0 - for Person.Name found accessor ReflectPropertyDescriptor(Name)
System.Windows.Data Warning: 102 : BindingExpression (hash=1661449): Replace item at level 0 with Person (hash=11550047), using accessor ReflectPropertyDescriptor(Name)

Leave a Reply

Your email address will not be published. Required fields are marked *