private void _trackedUsersManager_SessionUserUpdated(object sender, RLTracker.Models.Session.Session e) { var selectedItem = TrackedUserGrid.SelectedItem; if (selectedItem != null) { var record = selectedItem as TrackedUserViewModel; sessionsViewModel = new SessionsViewModel(); ViewModelMapper.SessionViewModel(e, sessionsViewModel, record.Name); SelectedPlayer.Content = record.Name; SessionsDataGrid.DataContext = sessionsViewModel.Sessions; SessionsDataGrid.Items.Refresh(); if (TrackedGrid.RowDefinitions[2].Height == new GridLength(0)) { TrackedGrid.RowDefinitions[2].Height = new GridLength(TrackedGrid.ActualHeight / 2 - 5); } } }