public ExpandableRowViewModel()
        {
            ShowDescriptionCommand = new Command <ViewCell>((viewCell) => { ShowDescriptionCommandExecute(viewCell); });

            Task.Run(async() =>
            {
                IsBusy          = true;
                var fruitesData = new FruitesDataService();
                var fruites     = (await fruitesData.GetItemsAsync(1, 50)).ToList();

                var items = new List <Fruite>();
                if (fruites != null)
                {
                    foreach (var f in fruites)
                    {
                        items.Add(new Fruite()
                        {
                            Name     = f.Name,
                            Price    = f.Price,
                            About    = f.About,
                            ImageURL = f.ImageURL,
                        });
                    }

                    Items = items;
                }
                IsBusy = false;
            });
        }
Exemplo n.º 2
0
 public DynamicRowHeightViewModel()
 {
     Task.Run(async() =>
     {
         IsBusy          = true;
         var fruitesData = new FruitesDataService();
         Items           = (await fruitesData.GetItemsAsync(1, 50)).ToList();
         IsBusy          = false;
     });
 }