public void ConfirmNewNotebookName(string newNotebookName) { NewNotebookClicked = false; NotebookModel notebook = Notebooks.ToList <NotebookModel>().Find(n => n.Name == newNotebookName); if (notebook == null) { try { DBDataAccessInsert.InsertNotebook(new NotebookModel() { UserId = User.Id, Name = newNotebookName }); Notebooks.Clear(); Notebooks = new BindableCollection <NotebookModel>(DBDataAccessLoad.LoadNotebooks(User.Id)); } catch (SQLiteException) { MessageBox.Show("Invalid Name"); } } else { MessageBox.Show("Notebook with this name already exists"); } }