private void btnAddEmail_Click(object sender, RoutedEventArgs e) { EmailAddressDialog ead = new EmailAddressDialog(); if (ead.ShowDialog() == true) { Email rec = new Email { EmailAddress = ead.EmailAddress }; _selectedEntries[_current].Emails.Add(rec); DB.SaveChanges(); _selectedEmails = _selectedEntries[_current].Emails.ToArray(); _curEmail = _selectedEmails.Length - 1; Display(); } }