Open nast90210 opened 8 years ago
Same problem on OS X 10.11.4 ,now I have to call Invalidate repeatly.
ObservableCollection not noticing when Item in it changes
class GridDate : INotifyPropertyChanged
{
private string _number;
public string Name { get; set; }
public float? Progress { get; set; }
public string Number
{
get { return _number; }
set
{
if (value != _number)
{
_number = value;
//Log.Write(this, "Changed value of {0} to {1}", Name, val);
OnPropertyChanged("Number");
}
}
}
protected virtual void OnPropertyChanged(string propertyName = null)
{
if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
public event PropertyChangedEventHandler PropertyChanged;
}
If i right understand the API: GridView "...supports MVVM in such that if the collection implements INotifyCollectionChanged, such as the ObservableCollection, it will update as changes are made to the underlying collection.". But in my code it doesn't work, and i have to use Invalidate() to see changes. It only happen in MonoMac; in Gtk# all works fine without Invalidate().
Sample: