internal void Collapse(ExpandedIngredientViewModel ingredient)
        {
            var index = this.Ingredients.IndexOf(ingredient);

            this.Ingredients[index] = new IngredientViewModel(ingredient.ParsedIngredient, ingredient.Product);
            TranslateIngredients(this.Ingredients, null);
        }
 internal void Collapse(ExpandedIngredientViewModel ingredient)
 {
     if (Parent == null)
     {
         Product.Collapse(ingredient);
     }
     else
     {
         Parent.Collapse(ingredient);
     }
 }
        internal void Expand(IngredientViewModel ingredient)
        {
            if (ingredient.HasChildren)
            {
                var index = this.Ingredients.IndexOf(ingredient);
                var expandedIngredient = new ExpandedIngredientViewModel(ingredient.ParsedIngredient, ingredient.Product);
                expandedIngredient.DisplayName = ingredient.DisplayName;
                //this.Ingredients[index] = expandedIngredient;
                //TranslateIngredients(expandedIngredient.Ingredients, null);

                this.Ingredients[index] = new ExpandedIngredientViewModel(ingredient.ParsedIngredient, ingredient.Product);
                TranslateIngredients(this.Ingredients, null);

                //below fades out and in
                //this.Ingredients.Remove(ingredient);
                //this.Ingredients.Insert(index, new ExpandedIngredientViewModel(ingredient.ParsedIngredient, ingredient.Product));
            }
        }