I have a ListBox which hold a set of objects (linked via ItemsSource bind to an ObservableCollection). I haven't used Dynamic binding yet. It currently use the ToString()
method of the object. The ToString() method shows a string this way : name (someOtherProperty)
However, even if the INotifyPropertyChanged is implemented and that i use an ObservableCollection, if i change an item property this string won't be updated.
I believe that this is because it only calls ToString
once. instead i guess i have to use data binding but how i can form such a string with it ? << name (someOtherProperty) >>
Thanks.
ToString
method just once, because it never receives a PropertyChange notification that would cause it to recall it. I think you can force it to callToString
again by doing aPropertyChanged(null)
which tells it to check all bindings again. Beyond that, I don't understand the rest of your question. – CodingGorilla