Пример #1
0
        private static void OnSpinningPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            a7WaitSpinner me = (a7WaitSpinner)d;

            if (me.IsSpinningChanged != null)
            {
                me.IsSpinningChanged(me, e);
            }
        }
Пример #2
0
        private static void OnAnglePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            a7WaitSpinner me = (a7WaitSpinner)d;

            if (!me.Spin && me.IsEnabled)
            {
                me.SpinAngle = (double)e.NewValue;
            }
        }
Пример #3
0
        private static void OnSpinPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            a7WaitSpinner me = (a7WaitSpinner)d;

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

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

            if (me.IsSpinChanged != null)
            {
                me.IsSpinChanged(me, e);
            }
        }
Пример #4
0
        private static void OnSpinRatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            a7WaitSpinner me = (a7WaitSpinner)d;

            me.SetSpinRate((double)e.NewValue);
        }