Reputation: 767
for example following 2 properties
public Decimal TradedDelta
{
get { return _confirmation.DeltaPercent; }
set {
_confirmation.DeltaPercent = value;
DeltaShareCount = ApplicationHelper.GetPercentValue(Multiplier * Size, value, AppConstants.BROKERHUB_ROUNDING_VAL);
OnPropertyChanged("TradedDelta");
}
}
public Decimal DeltaShareCount
{
get { return _confirmation.DeltaShares; }
set
{
_confirmation.DeltaShares = value;
TradedDelta = ApplicationHelper.GetPercentOF(value, Multiplier * Size, AppConstants.BROKERHUB_ROUNDING_VAL);
OnPropertyChanged("DeltaShareCount");
}
}
Upvotes: 0
Views: 108
Reputation: 81253
You have to check that yourself by putting equality check on your property setters. WPF can't handle that for you.
public Decimal TradedDelta
{
get { return _confirmation.DeltaPercent; }
set {
if(_confirmation.DeltaPercent != value) <-- HERE
{
_confirmation.DeltaPercent = value;
DeltaShareCount = ApplicationHelper.GetPercentValue(
Multiplier * Size, value, AppConstants.BROKERHUB_ROUNDING_VAL);
OnPropertyChanged("TradedDelta");
}
}
}
Upvotes: 3