public void LoadMoreItems(int itemsPerPage)
 {
     IsBusy = true;
     for (int i = CurrentPageValue; i < CurrentPageValue + itemsPerPage; i++)
     {
         MySimpleItems.Add(new MySimpleItem());
         //   MySimpleItems.Add(new MySimpleItem() { DisplayName = string.Format("This is item {0:0000}", i) });
     }
     // normally you'd check to see if the number of items returned is less than the number requested, i.e. you've run out, and then set this accordinly.
     CanLoadMoreItems = true;
     CurrentPageValue = MySimpleItems.Count;
     IsBusy           = false;
 }
Ejemplo n.º 2
0
 public void LoadMoreItems(int itemsPerPage)
 {
     IsBusy = true;
     for (int i = CurrentPageValue; i < CurrentPageValue + itemsPerPage; i++)
     {
         MySimpleItems.Add(new MySimpleItem()
         {
             ImageUrl     = "https://loremflickr.com/680/480?random=" + (i + 1) + "",
             DisplayName  = string.Format("This is item {0:0000}", i),
             Description  = "Regular Men's Bottom waer",
             OrginalPrice = 4000,
             Discount     = "40%",
             Price        = 1600
         });
     }
     // normally you'd check to see if the number of items returned is less than the number requested, i.e. you've run out, and then set this accordinly.
     CanLoadMoreItems = true;
     CurrentPageValue = MySimpleItems.Count;
     IsBusy           = false;
 }