private void ButtonAddSeason_OnClick(object sender, RoutedEventArgs e) { var newSeasonWindow = new NewSeasonWindow(); var dialogResult = newSeasonWindow.ShowDialog(); if (dialogResult != true) { return; } var newSeason = new Season { Name = newSeasonWindow.NewSeason.Name, Description = newSeasonWindow.NewSeason.Description, StartDate = newSeasonWindow.NewSeason.StartDate, EndDate = newSeasonWindow.NewSeason.EndDate }; _dataView.AddSeason(newSeason); SelectedSeason = Seasons.FirstOrDefault(s => s.Name == newSeason.Name); OnPropertyChanged(nameof(SelectedSeason)); SeasonComboBox.SelectedItem = SelectedSeason; }