private void LoadAnnotationView() { if (annList != null && annList.Count > 0) { // collectionView InitializeCollectionView(typeof(ThumbnailCell), "annotationCell"); // flowLayout collectionView.CollectionViewLayout = new DashboardLayout() { ItemSize = new CGSize(170, 270), SectionInset = new UIEdgeInsets(0, 0, 20, 0), HeaderReferenceSize = new CGSize(0, 0), MinimumLineSpacing = 20.0f }; // dataSource DashboardDataSource dataSource = new DashboardDataSource(book, annList as Object, DashboardDataSource.DataType.ANNOTATIONS, "annotationCell"); dataSource.ItemPressedEvent += HandleAnnotationPressedEvent; collectionView.Source = dataSource; collectionView.ReloadData(); collectionView.LayoutIfNeeded(); ShowHideAnnotationStatus(false); } else { ShowHideAnnotationStatus(true); } }
private void LoadChapterView() { if (chapterList != null && chapterList.Count > 0) { // collectionView InitializeCollectionView(typeof(ChapterCell), "chapterCell"); // flowLayout collectionView.CollectionViewLayout = new DashboardLayout() { ItemSize = new CGSize(220, 388.33f) }; // dataSource DashboardDataSource dataSource = new DashboardDataSource(book, chapterList as Object, DashboardDataSource.DataType.CHAPTERS, "chapterCell"); dataSource.ItemPressedEvent += HandleChapterPressedEvent; collectionView.Source = dataSource; collectionView.ReloadData(); collectionView.LayoutIfNeeded(); ShowHideChapterStatus(false); } else { ShowHideChapterStatus(true); } }