Inheritance: System.Windows.Controls.UserControl, IAnimation
Beispiel #1
0
        public override void PlayAnimation(AnimationBase animation, int playCenter, Point offset)
        {
            Canvas canvas;
            if (playCenter == 1) canvas = animationCenter1;
            else canvas = animationCenter2;

            animation.SetValue(Canvas.LeftProperty, -animation.Width / 2 + offset.X);
            animation.SetValue(Canvas.TopProperty, -animation.Height / 2 + offset.Y);
            canvas.Children.Add(animation);
            animation.Start();
        }
Beispiel #2
0
 public void PlayAnimation(AnimationBase animation)
 {
     animation.HorizontalAlignment = HorizontalAlignment.Center;
     animation.VerticalAlignment = VerticalAlignment.Center;
     animationCenter.Children.Add(animation);
     animation.Start();
 }
Beispiel #3
0
 public void PlayAnimation(AnimationBase animation, Point offset)
 {
     animationCenter.Children.Add(animation);
     animation.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
     animation.VerticalAlignment = System.Windows.VerticalAlignment.Center;
     animation.Start();
 }
Beispiel #4
0
 public virtual void PlayAnimation(AnimationBase animation, int playCenter, Point offset)
 {
 }
 public void PlayAnimationAsync(AnimationBase animation, int playCenter, Point offset)
 {
     Application.Current.Dispatcher.BeginInvoke((ThreadStart)delegate()
     {
         PlayAnimation(animation, playCenter, offset);
     });
 }