private void Change() { if (SourcesCombobox.SelectedItem != null) { Source s = (Source)SourcesCombobox.SelectedItem; SourceNameEditTextBox.Text = s.SourceName; SourceAuthorEditTextBox.Text = s.SourceAuthor; SourcePublisherEditTextBox.Text = s.SourcePublisher; //SourceNoteEditTextBox.Text = s.SourceNote; SourceRepositoryEditTextBox.Text = s.SourceRepository; try { SourceRepository.Content = "(" + repository.Find(SourceRepositoryEditTextBox.Text).RepositoryName + ")"; } catch { SourceRepository.Content = string.Empty; } } }