private async void LoadData() { //For favorite button display await FavoriteCategoryDS.Instance.Refresh(); this.DataContext = null; this.categoryDS = new CategoryPostDS(category); this.categoryDS.OnLoadMoreStarted += TitleControl.DS_OnLoadMoreStarted; this.categoryDS.OnLoadMoreCompleted += TitleControl.DS_OnLoadMoreCompleted; this.gv_CategoryPosts.ItemsSource = this.categoryDS; this.gv_SimplePosts.ItemsSource = this.categoryDS; await this.categoryDS.Refresh(); this.DataContext = this.categoryDS; }
private async void LoadData() { //FunctionHelper.Functions.RefreshUIOnDataLoading(this.pb_Top, this.appbar); this.DataContext = this.Category; this.categoryDS = new CategoryPostDS(this.Category); this.categoryDS.OnLoadMoreStarted += categoryDS_OnLoadMoreStarted; this.categoryDS.OnLoadMoreCompleted += categoryDS_OnLoadMoreCompleted; this.lv_CategoryPosts.ItemsSource = this.categoryDS; await this.categoryDS.LoadMoreItemsAsync(20); //FunctionHelper.Functions.RefreshUIOnDataLoaded(this.pb_Top, this.appbar); }