Ejemplo n.º 1
0
        private static void OnSpinningPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BizzySpinner me = (BizzySpinner)d;

            if (me.IsSpinningChanged != null)
            {
                me.IsSpinningChanged(me, e);
            }
        }
Ejemplo n.º 2
0
        private static void OnAnglePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BizzySpinner me = (BizzySpinner)d;

            if (!me.Spin && me.IsEnabled)
            {
                me.SpinAngle = (double)e.NewValue;
            }
        }
Ejemplo n.º 3
0
        private static void OnSpinRatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BizzySpinner me = (BizzySpinner)d;

            if (me.Spinning)
            {
                if (me.spinAnimation != null)
                {
                    Duration duration = TimeSpan.FromSeconds((double)e.NewValue);

                    if (me.spinAnimation.Duration != duration)
                    {
                        me.spinAnimation.Duration = duration;

                        me.ReBeginSpinningAnimation();
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private static void OnSpinPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BizzySpinner me = (BizzySpinner)d;

            if ((bool)e.NewValue)
            {
                // Spin is true: turn spin on if this control is enabled
                me.ControlSpinning(me.IsEnabled);
            }

            if (!(bool)e.NewValue)
            {
                me.ControlSpinning(false);
            }

            if (me.IsSpinChanged != null)
            {
                me.IsSpinChanged(me, e);
            }
        }