Relative Content

Tag Archive for wpfdata-binding

I do not understand error message ‘Binding cannot be changed after is has been used.’

I have 2 textboxes that I need to find in a WPF grid. I’ve found both of them. I then bind the the textboxes to properties in a class that uses INotifyPropertyChanged. The first textbox binds correctly. The second does not. I tried creating a new second text box and binding it to the original 2nd textbox property. I now receive error ‘Binding cannot be changed after it has been used’. I tried clearing the binding using ‘BindingOperations.ClearAllBindings(textBox02)’ but still get the error. I deleted the 2nd textbox and created another. It ran once without the error and then the error reappeared.
How to add IValueConverter to an existing Binding
has the same problem. I tried creating a new binding but get the same error on 2nd run.
I’m very new to WFP. I don’t know if the error is telling me that I need to use a new binding, bind to a different property, or replace the textbox. I’ve tried all three and still have the problem. Code for the various areas are below.
Thanks in advance,
Rod McKay