private static void AmountPropertyChanged(BindableObject bindable, object oldValue, object newValue) { if (newValue.IsNotNull()) { NumberEntry entry = (NumberEntry)bindable; entry.Amount = (decimal)newValue; entry.ChangeText(); } }
private static void NumberTypePropertyChanged(BindableObject bindable, object oldValue, object newValue) { if (newValue.IsNotNull()) { NumberEntry entry = (NumberEntry)bindable; entry.NumberType = (EnumNumberType)newValue; if (entry.NumberType == EnumNumberType.Percent) { entry.MinimumAmount = 0; entry.MaximumAmount = 100; } if (oldValue.IsNull()) { entry.ChangeText(); } } }
private static void MinimumAmountPropertyChanged(BindableObject bindable, object oldValue, object newValue) { NumberEntry entry = (NumberEntry)bindable; entry.MinimumAmount = (decimal)newValue; }