private async void LoadData() { // hide splash screen after 2 seconds ThreadPoolTimer.CreateTimer(SplashTimeOut, new TimeSpan(0, 0, 2)); this.recentDS = new LatestPostsDS(); this.recentDS.DataRequestError += recentDS_DataRequestError; this.recentDS.OnLoadMoreCompleted += recentDS_OnLoadMoreCompleted; this.lv_HomePosts.ItemsSource = this.recentDS; this.tb_HomeTag.DataContext = this.recentDS; this.topViewDS = new DataHelper.CloudAPI.TwoDaysTopViewPostsDS(); this.topViewDS.DataRequestError += recentDS_DataRequestError; this.lv_HotPosts.ItemsSource = this.topViewDS; this.tb_HotTag.DataContext = this.topViewDS; this.topLikeDS = new TenDaysTopLikePostsDS(); this.topLikeDS.DataRequestError += recentDS_DataRequestError; this.lv_BestPosts.ItemsSource = this.topLikeDS; this.tb_BestTag.DataContext = this.topLikeDS; this.topBloggerDS = new RecommendBloggerDS(); this.topBloggerDS.DataRequestError += recentDS_DataRequestError; this.lv_Bloggers.ItemsSource = this.topBloggerDS.Bloggers; await topBloggerDS.LoadRemoteData(); this.newsDs = new NewsDS(); this.newsDs.DataRequestError += recentDS_DataRequestError; this.lv_News.ItemsSource = this.newsDs; this.tb_NewsTag.DataContext = this.newsDs; }
private void LoadData() { this.topLikeDS = new TenDaysTopLikePostsDS(); this.topLikeDS.OnLoadMoreStarted += TitleControl.DS_OnLoadMoreStarted; this.topLikeDS.OnLoadMoreCompleted += TitleControl.DS_OnLoadMoreCompleted; this.gv_BestPosts.ItemsSource = this.topLikeDS; this.gv_SimplePosts.ItemsSource = this.topLikeDS; this.DataContext = this.topLikeDS; }
private async void LoadData() { //FunctionHelper.Functions.RefreshUIOnDataLoading(this.pb_Top, this.appbar); this.bestPostsDS = new TenDaysTopLikePostsDS(); this.bestPostsDS.OnLoadMoreStarted += bestPostsDS_OnLoadMoreStarted; this.bestPostsDS.OnLoadMoreCompleted += bestPostsDS_OnLoadMoreCompleted; this.lv_BestPosts.ItemsSource = this.bestPostsDS; await this.bestPostsDS.LoadMoreItemsAsync(20); //FunctionHelper.Functions.RefreshUIOnDataLoaded(this.pb_Top, this.appbar); }
private void LoadData() { this.topLikeDS = new TenDaysTopLikePostsDS(); this.gv_BestPosts.ItemsSource = this.topLikeDS; this.DataContext = this.topLikeDS; }