title: Calculated properties in Model
body: <p>Bonjour !</p>
  
  <p>I have Product model who contain many classics properties (Code, Description, Price With VAT, Price WITHOUT Vat, VAT). For my example I put only interesting properties.</p>
  
  <p>In this model, I want to add prices calculations. When any amount change, to calculate other properties (When Vat change, recalculate Price With Vat and Price Without Vat, vice versa)</p>
  
  <p>My example :</p>
  
  <pre><code>public class Product : EditableObject
  {
  
      //VAT percentage propertie (ex: 20%)
      private decimal _vat;
      public decimal Vat
      {
          get { return _vat; }
          set
          {
              _vat = value;
              PriceWithVat = _priceWithoutVat * (1 + Vat / 100); //Vat changed, we recalculate Price WITH VAT propertie
              PriceWithoutVat = _priceWithVat / (1 + Vat / 100); //Vat changed, we recalculate Price WITHOUT VAT propertie
              NotifyOfPropertyChange(() =&gt; Vat);                
          }
      }
  
      //Product Price Without VAT
      private decimal _priceWithoutVat;
      public decimal PriceWithoutVat
      {
          get { return _priceWithoutVat; }
          set
          {
              _priceWithoutVat = value;                
              PriceWithVat = _priceWithoutVat * (1 + Vat / 100); //PriceWithoutVat changed, we recalculate Price WITH VAT propertie
              NotifyOfPropertyChange(() =&gt; PriceWithoutVat);
          }
      }
  
      //Product Price WITH Vat
      private decimal _priceWithVat;
      public decimal PriceWithVat
      {
          get { return _priceWithVat; }
          set
          {
              _priceWithVat = value;                
              PriceWithoutVat = _priceWithVat / (1 + Vat / 100); //PriceWithVat changed, we recalculate Price WITHOUT VAT propertie
              NotifyOfPropertyChange(() =&gt; PriceWithVat);
          }
      }       
  
   }
  </code></pre>
  
  <p>With this, when any price change, I have infinity loop and Stack Overflow. Normal, because when any price change, all others are recalculated, and they recalculate prices in turn :)</p>
  
  <p>Do you have solution to automatically recalculate my 3 amounts when any of them change ?</p>