private void RemoveConfigGroup(object obj) { ConfigurationGroup configGroup = obj as ConfigurationGroup; if (configGroup != null) { var result = MessageBox.Show("Are you sure you want to remove this Configuration Group?", "", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { ConfigurationList.Remove(configGroup); } } }