Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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();
                }
            }
        }
Ejemplo n.º 3
0
        private static void MinimumAmountPropertyChanged(BindableObject bindable, object oldValue, object newValue)
        {
            NumberEntry entry = (NumberEntry)bindable;

            entry.MinimumAmount = (decimal)newValue;
        }