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
Depending on what "things" you want to recalculate, you might consider using the ScrollViewer.ScrollChanged attached event. This can be set in XAML as follows:
The ScrollChangedEventArgs object has various properties that can be helpful for computing layout and scroll position (Extent, Offset, Viewport). Note that these are typically measured in numbers of rows/columns when using the default virtualization settings.