Example #1
0
        private void AnimateForward(SlideFrameControl control)
        {
            if (w == double.NaN)
            {
                return;
            }
            Grid g = new Grid();

            g.Width  = w;
            g.Height = h;
            g.Children.Add(control);
            if (_slides.Count() > 0)
            {
                g.Background = new SolidColorBrush(Colors.White);
            }

            canvas.Children.Add(g);
            Canvas.SetLeft(g, w);
            DoubleAnimation da = new DoubleAnimation
            {
                From     = w,
                To       = 0,
                Duration = TimeSpan.FromMilliseconds(_animationTimeMilliseconds)
            };

            Storyboard.SetTarget(da, g);
            Storyboard.SetTargetProperty(da, new PropertyPath(Canvas.LeftProperty));
            Storyboard sb = new Storyboard();

            sb.Children.Add(da);
            sb.Begin();
            _slides.Add(g);
            txtHeader.Text = control.Name;
        }
Example #2
0
 public void AddFrame(SlideFrameControl control)
 {
     if (_loadComplete)
     {
         _slideStack.Add(control);
         AnimateForward(control);
     }
     else
     {
         _preLoadingTempStorage.Add(control);
     }
 }