2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-06-30 16:23:41 -04:00

Implement scorlling BasicUIView grids to the bottom plus refactoring

Upon arrival of new records to the backing ObservableCollection, scroll the DataGrid to the last item. However, when the DataGrid is initialized, there's not yet a data context set, so when that happens, then we can listen to the CollectionChanged event to trigger scrolling (only really needed for additions).

In passing, also set the DataGrid to ReadOnly.

In the other two files, minor simplifications/cleanup.
This commit is contained in:
Fred Kuipers
2021-06-21 20:04:17 -04:00
parent 6902361f00
commit 2d672e9c2a
3 changed files with 28 additions and 8 deletions

View File

@ -29,8 +29,6 @@ namespace Observatory.UI.ViewModels
public BasicUIViewModel(ObservableCollection<object> BasicUIGrid)
{
this.BasicUIGrid = new();
this.BasicUIGrid = BasicUIGrid;
}