public MenuItemPage() { InitializeComponent(); Item = new WPPod.Models.MenuItem { Title = "Menu Item title", Description = "This is a nice description", Price = 0, PhotoURL = "path to menu item image" }; BindingContext = this; FoodType.SelectedIndex = 0; }
async public Task <ServerStatus> LoadMenuItemsAsync() { ServerStatus status = new ServerStatus( ServerStatus.NEST_RESULT_ERROR); if (IsBusy) { return(status); } IsBusy = true; try { EditMenuItems.Clear(); WPPod.Models.MenuItem menuItemSeed = new WPPod.Models.MenuItem(); menuItemSeed.Menu = _selectedMenu; status = await ResultMultiple <WPPod.Models.MenuItem> .WaitForObjectAsync( NesterControl.DeployedApp, true, menuItemSeed, false); if (status.Code >= 0) { _menuItems = status.PayloadToList <WPPod.Models.MenuItem>(); OnPropertyChanged("EditMenuItems"); SelectedMenuItem = _menuItems.FirstOrDefault(); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } return(status); }