public static void AddCategory(string category) { Categories.Add(category); var sorted = Categories.OrderBy(x => x).ToList(); Categories.Clear(); Categories.AddRange(sorted); }
public void LoadList(List <Book> list) { if (list == null) { return; } ShownBooks.Clear(); list.ForEach(book => { book.DownloadedGUI = book.IsDownloaded; }); ShownBooks.AddRange(list); BookCount = $"Shown: {ShownBooks.Count}"; }