Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        private async void sz_FavoritePosts_ViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            if (!e.IsSourceZoomedInView & isZoomOutTapped)
            {
                Category category = e.DestinationItem.Item as Category;
                this.categoryDS = new CategoryPostDS(category);
                this.categoryDS.OnLoadMoreStarted   += TitleControl.DS_OnLoadMoreStarted;
                this.categoryDS.OnLoadMoreCompleted += TitleControl.DS_OnLoadMoreCompleted;
                gv_CategoryPosts.ItemsSource         = this.categoryDS;
                this.DataContext = categoryDS;

                //change the topic
                this.TitleControl.TitleContent = "全站 - 分类 - " + category.Name;

                //get data
                await this.categoryDS.LoadMoreItemsAsync(20);

                //ensure is tapped
                isZoomOutTapped = false;
            }
        }