Example #1
0
        private void ScrollToNextControl(ComplexDataInputControl btn)
        {
            btn.IsIgnoringClicks = true;

            // Show next Control
            DoubleAnimation anim = new DoubleAnimation();

            anim.From              = (_panels.Count - 2) * -CONTROL_WIDTH;
            anim.To                = anim.From - CONTROL_WIDTH;
            anim.Duration          = new Duration(new TimeSpan(0, 0, 0, 0, SCROLLTO_CONTROL_SPEED));
            anim.RepeatBehavior    = new RepeatBehavior(1);
            anim.Completed        += (s2, e2) => { btn.IsIgnoringClicks = false; };
            anim.AccelerationRatio = 1;

            TranslateTransform trans = new TranslateTransform();

            theStack.RenderTransform = trans;
            trans.BeginAnimation(TranslateTransform.XProperty, anim);
        }
        private void ScrollToNextControl(ComplexDataInputControl btn)
        {
            btn.IsIgnoringClicks = true;

              // Show next Control
              DoubleAnimation anim = new DoubleAnimation();
              anim.From = ( _panels.Count - 2 ) * -CONTROL_WIDTH;
              anim.To = anim.From - CONTROL_WIDTH;
              anim.Duration = new Duration(new TimeSpan(0, 0, 0, 0, SCROLLTO_CONTROL_SPEED));
              anim.RepeatBehavior = new RepeatBehavior(1);
              anim.Completed += (s2, e2) => { btn.IsIgnoringClicks = false; };
              anim.AccelerationRatio = 1;

              TranslateTransform trans = new TranslateTransform();

              theStack.RenderTransform = trans;
              trans.BeginAnimation(TranslateTransform.XProperty, anim);
        }