private void DataGrid_SizeChanged(object sender, EventArgs e) { if (null == LogViewModel) { return; } if (LogViewModel.IsReading) { return; } double dataGridActualHeight = Lines.ActualHeight; double rowHeight = Lines.RowHeight * Lines.Items.Count; if (dataGridActualHeight < rowHeight) { return; } LogViewModel.ExpandingView = true; long startingByteForNewRead = LogViewModel.LastLineEndingByte; LogViewModel.ContinueReadFromByteLocation(startingByteForNewRead, FindByteLocationActorMessages.SearchDirection.Backward, 1); }