private void Delete() { if (MessageBox.Show(Properties.Resources.DELETE_CONFIRMATION_TEXT, Properties.Resources.DELETE_CONFIRMATION_TITLE, MessageBoxButton.YesNo) == MessageBoxResult.Yes) { libraryAdminService.DeleteGadget(SelectedGadget); Gadgets.Remove(SelectedGadget); SelectedGadget = Gadgets.ElementAt(0); } }