private async void LoadBookshelf() { Bookshelf.Children.Clear(); var books = await _bookshelfService.LoadBooks(); foreach (var book in books) { Bookshelf.Children.Add(new BookCard(book)); } }
private async void LoadBookshelf() { Bookshelf.Children.Clear(); var books = await _bookshelfService.LoadBooks(); foreach (var book in books) { var bc = new BookCard(book); bc.OnOpenBook += OpenBook; bc.OnDeleteBook += DeleteBook; Bookshelf.Children.Add(bc); } }