private void OnReload(object obj) { Recipes.Clear(); var provider = ProviderFactory.CreateRecipeProvider(); foreach(var recipe in provider.GetByName(100)) { var state = new RecipeViewModelState(); state.SubmitCommand = new DelegateCommand<RecipeViewModelState>(z => OnSubmit(state), state, x => x.CanSubmit); state.Initialize(recipe); Recipes.Add(state); } }
private void OnReload(object obj) { Recipes.Clear(); var provider = ProviderFactory.CreateRecipeProvider(); foreach (var recipe in provider.GetByName(100)) { var state = new RecipeViewModelState(); state.SubmitCommand = new DelegateCommand <RecipeViewModelState>(z => OnSubmit(state), state, x => x.CanSubmit); state.Initialize(recipe); Recipes.Add(state); } }