상속: System.Windows.Controls.UserControl, IAnimation
예제 #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();
        }
예제 #2
0
 public void PlayAnimation(AnimationBase animation)
 {
     animation.HorizontalAlignment = HorizontalAlignment.Center;
     animation.VerticalAlignment = VerticalAlignment.Center;
     animationCenter.Children.Add(animation);
     animation.Start();
 }
예제 #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();
 }
예제 #4
0
 public virtual void PlayAnimation(AnimationBase animation, int playCenter, Point offset)
 {
 }
예제 #5
0
 public void PlayAnimationAsync(AnimationBase animation, int playCenter, Point offset)
 {
     Application.Current.Dispatcher.BeginInvoke((ThreadStart)delegate()
     {
         PlayAnimation(animation, playCenter, offset);
     });
 }