private void RefocusGrid(FlaggedPersonViewModel target) { FlaggedPersonViewModel test = (from d in contextViewModel.FlaggedPeople where d.FirstName == target.FirstName && d.LastName == target.LastName && d.DateModified == target.DateModified select d).FirstOrDefault(); if (test != null) { FlaggedPersonDataGrid.ScrollIntoView(test); FlaggedPersonDataGrid.SelectedItem = test; } }
private void RefocusGrid(int target) { if (target > 0) { target = target - 1; } else { target = 0; } FlaggedPersonDataGrid.SelectedIndex = target; FlaggedPersonDataGrid.UpdateLayout(); FlaggedPersonDataGrid.ScrollIntoView(FlaggedPersonDataGrid.SelectedItem); }