private void editConfiguration_Click(object sender, RoutedEventArgs e) { if (configView.SelectedItems.Count > 0) { ConfigurationSaveItem saveItem = configHandler.getSaveItem((ConfigurationViewItem)configView.SelectedItem); createNewDialog.currentViewItem = (ConfigurationViewItem)configView.SelectedItem; createNewDialog.Title = "Edit Item"; createNewDialog.authorNameTxt.Text = saveItem.viewItem.author; createNewDialog.websiteNameTxt.Text = saveItem.viewItem.websiteName; createNewDialog.configNameTxt.Text = saveItem.viewItem.configName; createNewDialog.successKeysTxt.Text = String.Join(",", saveItem.successKeys); createNewDialog.ShowAsync(); } else { _ = new CustomDialog("Information", "Please select a configuration to edit.").ShowAsync(); } }