Esempio n. 1
0
        private void Page_Click(object sender, RoutedEventArgs e)
        {
            if (sender is Button btn)
            {
                if (btn.Content.ToString() == "首页")
                {
                    HomePageViewModel.Initialization().PageIndex = 0;
                    LoadData();
                }

                if (btn.Content.ToString() == "上一页")
                {
                    HomePageViewModel.Initialization().PageIndex -= 2;
                    LoadData();
                }

                if (btn.Content.ToString() == "下一页")
                {
                    LoadData();
                }

                if (btn.Content.ToString() == "尾页")
                {
                    HomePageViewModel.Initialization().PageIndex = HomePageViewModel.Initialization().PageCount - 1;
                    LoadData();
                }
            }
        }
Esempio n. 2
0
        public void LoadData()
        {
            HomePageViewModel.Initialization().NextPage();


            if (!HomePageViewModel.Initialization().Waterfall)
            {
                if (HomePageViewModel.Initialization().ImageList.Count > 1)
                {
                    ImageListControl.ScrollIntoView(HomePageViewModel.Initialization().ImageList[0]);
                }
            }
        }
Esempio n. 3
0
 public HomePage()
 {
     InitializeComponent();
     DataContext = HomePageViewModel.Initialization();
 }