I would like to use data binding when displaying data in a TextBox. I basically do as:
public void ShowRandomObject(IRandomObject randomObject) { Binding binding = new Binding {Source = randomObject, Path = new PropertyPath("Name")}; txtName.SetBinding(TextBox.TextProperty, binding); }
I can not find a way to unlink. I will call this method many different objects, but the TextBox will remain the same. Is there a way to remove the previous binding or is it done automatically when I establish a new binding?
c # wpf
Robert HΓΆglund 09 Oct '08 at 9:05 2008-10-09 09:05
source share