public IngredientDetailViewModel(RecipePartViewModel recipePartViewModel, Model.IngredientDetail ingredientDetail)
        {
            if (recipePartViewModel == null)
            throw new ArgumentNullException ("recipePartViewModel");
             if (ingredientDetail == null)
            throw new ArgumentNullException ("ingredientDetail");

             m_recipePartViewModel = recipePartViewModel;
             m_ingredientDetail = ingredientDetail;
             m_index = m_recipePartViewModel.Ingredients.IndexOf (this);
             m_amountRange = new FractionRange (ingredientDetail.Amount, ingredientDetail.AmountMax);
             m_amountRange.PropertyChanged +=
            (s, dea) =>
               {
                  m_ingredientDetail.Amount = m_amountRange.Amount;
                  m_ingredientDetail.AmountMax = m_amountRange.AmountMax;
               };
        }
        public IngredientDetailViewModel(RecipePartViewModel recipePartViewModel, Model.IngredientDetail ingredientDetail)
        {
            if (recipePartViewModel == null)
            {
                throw new ArgumentNullException("recipePartViewModel");
            }
            if (ingredientDetail == null)
            {
                throw new ArgumentNullException("ingredientDetail");
            }

            m_recipePartViewModel = recipePartViewModel;
            m_ingredientDetail    = ingredientDetail;
            m_index       = m_recipePartViewModel.Ingredients.IndexOf(this);
            m_amountRange = new FractionRange(ingredientDetail.Amount, ingredientDetail.AmountMax);
            m_amountRange.PropertyChanged +=
                (s, dea) =>
            {
                m_ingredientDetail.Amount    = m_amountRange.Amount;
                m_ingredientDetail.AmountMax = m_amountRange.AmountMax;
            };
        }