private async void SetPage(int newPageNumber) { if (PageLoader == null) { return; } var newPage = await PageLoader.LoadPage(newPageNumber); if (newPage == null) { return; } CurrentPage = newPage; CurrentPageNumber = newPageNumber; ResetDrag(); Window.setPageLabel(string.Format("{0} / {1}", CurrentPageNumber + 1, PageLoader.NumPages)); Refresh(); PageLoader.LoadPage(newPageNumber + 1); // Kick off the next page if it's not already }