/// <summary> /// Command for removing author from the selected author list /// </summary> public void RemoveAuthorExecute() { ViewAuthor author = SelectedCurrentAuthor; SelectedAuthorList.Remove(author); PossibleAuthorsList.Add(author); }
/// <summary> /// Method for filtering out possible authors depending on a given query /// </summary> /// <param name="query"></param> public void FilterOutAuthors(string query) { if (query == "") { PossibleAuthorsList = new ObservableCollection <ViewAuthor>(_allAuthorsList); } else { PossibleAuthorsList.Clear(); foreach (ViewAuthor viewAuthor in _allAuthorsList) { if (viewAuthor.Name.ToLower().StartsWith(query.ToLower())) { PossibleAuthorsList.Add(viewAuthor); } } } }