コード例 #1
0
 public DummyViewModel()
 {
     Color       = Color.Blue;
     Title       = "Dummy";
     TestCommand = new Command(() => {
         var exhibits = ExhibitManager.GetExhibits();
         var ex       = exhibits.FirstOrDefault();
         Navigation.PushAsync(new ExhibitDetailsViewModel(ex.Id));
     });
 }
コード例 #2
0
        private List <ExhibitCellViewModel> LoadExhibitsData()
        {
            List <ExhibitCellViewModel> exhibits     = new List <ExhibitCellViewModel>();
            IEnumerable <Exhibit>       exhibitsData = ExhibitManager.GetExhibits();

            foreach (Exhibit exhibit in exhibitsData)
            {
                ExhibitCellViewModel exhibitCellModel = new ExhibitCellViewModel(exhibit.Id, exhibit.Image, exhibit.Name);
                exhibits.Add(exhibitCellModel);
            }

            return(exhibits);
        }