示例#1
0
        public BookCard(Model.Bookshelf.Book book)
        {
            _book = book;

            StyleId = book.ID;

            BindingContext = new {
                book.Title,
                Width            = Card.CardWidth,
                Height           = Card.CardHeight,
                PlaceholderWidth = Card.CardWidth * .75,
                IsFinished       = book.FinishedReading.HasValue
            };

            InitializeComponent();

            this.LoadImage();

            DeleteIcon.GestureRecognizers.Add(
                new TapGestureRecognizer {
                Command = new Command(() => { this.Delete(); })
            }
                );

            GestureRecognizers.Add(
                new TapGestureRecognizer {
                Command = new Command(() => { this.Open(); }),
            });
        }
示例#2
0
        private async void SendBookToReader(Model.Bookshelf.Book book)
        {
            var page = new ReaderPage();

            page.LoadBook(book);
            await Navigation.PushAsync(page);
        }