Ejemplo n.º 1
0
        void UpdateEnableRipple()
        {
            var oldValue = _useRipple;
            var newValue = AddCommand.GetEnableRipple(Element);

            _useRipple = newValue;
            if (newValue == oldValue)
            {
                return;
            }

            var color = AddCommand.GetEffectColor(Element);

            if (color == Xamarin.Forms.Color.Default)
            {
                return;
            }

            if (!oldValue && newValue)
            {
                AddRipple();
            }
            if (oldValue && !newValue)
            {
                RemoveRipple();
            }
            UpdateEffectColor();
        }
        void UpdateEnableRipple()
        {
            _useRipple = AddCommand.GetEnableRipple(Element);

            if (_useRipple)
            {
                AddRipple();
            }
            else
            {
                RemoveRipple();
            }

            UpdateEffectColor();
        }
        void UpdateEnableRipple()
        {
            _useRipple = AddCommand.GetEnableRipple(Element);

            var color = AddCommand.GetEffectColor(Element);

            if (color == Xamarin.Forms.Color.Default)
            {
                return;
            }

            if (_useRipple)
            {
                AddRipple();
            }
            else
            {
                RemoveRipple();
            }

            UpdateEffectColor();
        }