I wish to recalculate things everytime a DataGrid gets more rows or some are removed. I tried to use the Loaded
event, but that was fired only once.
I found
If you want use ObservableCollection and get notification about add or another operation, the best way use INotifyCollectionChanged
var source = datagrid.ItemsSource as INotifyCollectionChanged;
Because, when you will unwrap to ObservableCollection
, you must write strogly MyClass (not ObservableCollection
())