示例#1
0
 private static void AmountPropertyChanged(BindableObject bindable, object oldValue, object newValue)
 {
     if (newValue.IsNotNull())
     {
         NumberEntry entry = (NumberEntry)bindable;
         entry.Amount = (decimal)newValue;
         entry.ChangeText();
     }
 }
示例#2
0
        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();
                }
            }
        }
示例#3
0
        private static void MinimumAmountPropertyChanged(BindableObject bindable, object oldValue, object newValue)
        {
            NumberEntry entry = (NumberEntry)bindable;

            entry.MinimumAmount = (decimal)newValue;
        }