/// <summary> /// Remove selected categories /// </summary> private void RemoveCategories() { foreach (string category in _selectedEntrys .Select(view => view.FindViewById <TextView>(Resource.Id.categoryName).Text)) { foreach (Note note in NoteStorage.Notes.Where(note => note.CategoryId == NoteStorage.GetCurrentCategories(_rootActivity).IndexOf(category))) { note.CategoryId = 0; } NoteStorage.RemoveCategory(_rootActivity, category); } SecurityProvider.SaveNotesAsync(); _selectedEntrys.Clear(); HideDeleteButton(); PopulateList(_list); }