Is it possible to bind a field (textbox) to a Property that doesn't implement a set?
For instance I have an object that implements INotifyPropertyChanged with 3 fields:
public decimal SubTotal
{
get { return this.subTotal; }
set
{
this.subTotal = value;
this.NotifyPropertyChanged("SubTotal");
this.NotifyPropertyChanged("Tax");
this.NotifyPropertyChanged("Total");
}
}
public decimal Tax
{
get { return this.taxCalculator.Calculate(this.SubTotal, this.Region); }
}
public decimal Total
{
get { return this.SubTotal + this.Tax; }
}
I can't quite test this yet as the UI isn't made and there is much other work to be done in this class before it will function, but is this possible the way I have it, or is there a different way?