I\'m trying to get a ListView to change to whatever values I modify in my ObvservableCollection.
I\'m currently using this and binding the Collection to my ListView
An ObservableCollection will handle the case where items are added or removed from the collection, but it won't handle the case where properties of items in the collection are changed. As per MSDN: Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed.
You'll need to make sure your Task class implements the INotifyPropertyChanged interface, and fires PropertyChanged events when its TaskNumber property changes:
private string _taskNumber;
public string TaskNumber
{
get { return _taskNumber; }
set
{
if(_taskNumber!= value)
{
_taskNumber= value;
OnPropertyChanged("TaskNumber");
}
}
}
Your Task class implements INotifyPropertyChanged, but it never actually fires PropertyChanged events when the values of its properties change. You need to manually call OnPropertyChanged when each of your properties change - it doesn't happen automatically.