Invoking BindingList changed event when an item's property changes value
I have a ListBox that is bound to a ViewModel property of type BindingList(Of MyItem) (lets call it MyTrueList). The MyTr开发者_高级运维ueList property actually looks at another BindingList(Of MyItem) and returns a list where MyItem.MyProperty = true. MyItem implements INotifyPropertyChanged.
I also have a button whose event changes the selected item's MyProperty to false.
I was under the impression that because I have set my ListBox' ItemSource to {Binding MyTrueList}, it will automatically update the list since I have changed the MyProperty value.
If it does not update it automatically, how should I tell the ListBox to check the MyTrueList value again?
Because the ViewModel uses INotifyPropertyChanged, I simply invoked the notify event for any changes I make with the list member's properties that may affect the list display.
精彩评论