public IngredientDetailsPage(IngredientDetailViewModel viewModel) { NavigationPage.SetHasNavigationBar(this, false); InitializeComponent(); BindingContext = viewModel; SelectedUnits.SelectedIndex = 0; }
public IngredientDetailPage() { InitializeComponent(); var ing = new SimpleIngredient(); viewModel = new IngredientDetailViewModel(ing); BindingContext = viewModel; }
public IngredientDetailPage(IngredientDetailViewModel viewModel) { InitializeComponent(); BindingContext = this.viewModel = viewModel; AddFav.Command = new Command(AddFav_OnClicked); RemoveFav.Command = new Command(RemoveFav_OnClicked); }
public async Task <IActionResult> Detail(Guid id) { var ingredient = await _ingredientFacade.GetByIdAsync(id); var ingredientDetailViewModel = new IngredientDetailViewModel { IngredientDetail = ingredient }; return(View(ingredientDetailViewModel)); }
public ItemDetailPage() { InitializeComponent(); var item = new FoodItem { Name = "Item 1", UnitsID = 22 }; viewModel = new IngredientDetailViewModel(item); BindingContext = viewModel; }
/// <summary> /// Handles the actions to do when this activity is created /// </summary> /// <param name="savedInstanceState">Saved instance state.</param> protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); var data = Intent.GetStringExtra("data"); senderRow = Intent.GetIntExtra("row", 0); ingredient = Newtonsoft.Json.JsonConvert.DeserializeObject <Ingredient>(data); viewModel = new IngredientDetailViewModel(ingredient); foodGroupView = FindViewById <TextView>(Resource.Id.foodgroup_ingredientDetail); allergenView = FindViewById <TextView>(Resource.Id.allergen_ingredientDetail); unitView = FindViewById <TextView>(Resource.Id.unit_ingredientDetail); priceView = FindViewById <TextView>(Resource.Id.price_ingredientDetail); }
public IngredientDetailView(IngredientDetailViewModel ingredientDetailViewModel) : base(ingredientDetailViewModel) { InitializeComponent(); }
public ItemDetailPage(IngredientDetailViewModel viewModel) { InitializeComponent(); BindingContext = this.viewModel = viewModel; }