public async Task NewLocation()
        {
            Location newLocation = new Location();

            SelectedLocationViewModel = new LocationViewModel(Navigation, newLocation)
            {
                CreateMode = true
            };
            LocationViewModels.Add(SelectedLocationViewModel);
            LocationCardPage lnp = new LocationCardPage(SelectedLocationViewModel);
            await Navigation.PushAsync(lnp);
        }
Ejemplo n.º 2
0
 private void FillModel(List <Location> list)
 {
     if (list.Count > 0)
     {
         ClearAll();
         foreach (Location location in list)
         {
             LocationViewModel lvm = new LocationViewModel(Navigation, location);
             LocationViewModels.Add(lvm);
         }
         State = ModelState.Normal;
     }
     else
     {
         State = ModelState.NoData;
     }
 }
 private void FillModel(List <Location> list)
 {
     if (list.Count > 0)
     {
         ClearAll();
         foreach (Location location in list)
         {
             SetDefaultSizes(location);
             LocationViewModel lvm = new LocationViewModel(Navigation, location);
             lvm.OnTap += Lvm_OnTap;
             LocationViewModels.Add(lvm);
         }
         State = ModelState.Normal;
         UpdateMinSizes();
         Rebuild(true);
     }
     else
     {
         State = ModelState.NoData;
     }
 }