예제 #1
0
        private async void LoadBookshelf()
        {
            Bookshelf.Children.Clear();

            var books = await _bookshelfService.LoadBooks();

            foreach (var book in books)
            {
                Bookshelf.Children.Add(new BookCard(book));
            }
        }
예제 #2
0
        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);
            }
        }