Example #1
0
        /// <summary>
        /// Fade in opacity of the window, let the progress ring appear and collapse the NoMouvieFound label when loading movies
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">EventArgs</param>
        private void OnMoviesLoading(object sender, EventArgs e)
        {
            // We have to deal with the DispatcherHelper, otherwise we're having the classic cross-thread access exception
            DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                ProgressRing.IsActive = true;

                #region Fade in opacity
                DoubleAnimationUsingKeyFrames opacityAnimation = new DoubleAnimationUsingKeyFrames();
                opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.5));
                PowerEase opacityEasingFunction = new PowerEase();
                opacityEasingFunction.EasingMode = EasingMode.EaseInOut;
                EasingDoubleKeyFrame startOpacityEasing = new EasingDoubleKeyFrame(1, KeyTime.FromPercent(0));
                EasingDoubleKeyFrame endOpacityEasing = new EasingDoubleKeyFrame(0.2, KeyTime.FromPercent(1.0),
                    opacityEasingFunction);
                opacityAnimation.KeyFrames.Add(startOpacityEasing);
                opacityAnimation.KeyFrames.Add(endOpacityEasing);
                ItemsList.BeginAnimation(OpacityProperty, opacityAnimation);
                #endregion

                if (NoMouvieFound.Visibility == Visibility.Visible)
                {
                    NoMouvieFound.Visibility = Visibility.Collapsed;
                }
            });
        }
 /// <summary>
 /// 初始化HUD控制器
 /// </summary>
 void InitializeHUDController()
 {
     initializer.AdaptiveWindowSize();
     LayoutRoot.Children.Add(initializer);
     LayoutRoot.Children.Add(leaderInfo);
     LayoutRoot.Children.Add(targetInfo);
     LayoutRoot.Children.Add(radarMap);
     LayoutRoot.Children.Add(menuBar);
     LayoutRoot.Children.Add(chatPanel);
     chatPanel.Send += (s, e) => { leader.Say(new Talk() { Content = e.Content, Duration = 6000 }); };
     Application.Current.Host.Content.Resized += Content_Resized;
     this.KeyDown += (s, e) => {
         if (e.Key == Key.Escape) {
             if (dramaDialogue.IsShowing) { dramaDialogue.Hide(); }
         }
     };
     dramaDialogue.Showing += delegate {
         if (!LayoutRoot.Children.Contains(dramaDialogue)) { LayoutRoot.Children.Add(dramaDialogue); }
         Storyboard storyboard = new Storyboard();
         Duration duration = TimeSpan.FromMilliseconds(500);
         PowerEase powerEase = new PowerEase() { EasingMode = EasingMode.EaseOut };
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(leaderInfo, "Opacity", 1, 0, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(targetInfo, "Opacity", 1, 0, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(radarMap, "Opacity", 1, 0, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(menuBar, "Opacity", 1, 0, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(chatPanel, "Opacity", 1, 0, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(consoleWindow, "Opacity", 1, 0, duration, powerEase));
         storyboard.Begin();
     };
     dramaDialogue.Hiding += delegate {
         if (LayoutRoot.Children.Contains(dramaDialogue)) { LayoutRoot.Children.Remove(dramaDialogue); }
         Storyboard storyboard = new Storyboard();
         Duration duration = TimeSpan.FromMilliseconds(500);
         PowerEase powerEase = new PowerEase() { EasingMode = EasingMode.EaseOut };
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(leaderInfo, "Opacity", 0, 1, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(targetInfo, "Opacity", 0, 1, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(radarMap, "Opacity", 0, 1, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(menuBar, "Opacity", 0, 1, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(chatPanel, "Opacity", 0, 1, duration, powerEase));
         storyboard.Children.Add(GlobalMethod.CreateDoubleAnimation(consoleWindow, "Opacity", 0, 1, duration, powerEase));
         storyboard.Begin();
         #region 调试副本
         if (instance is GodFam) {
             if (((GodFam)instance).Step == Components.Instance.GodFam.Steps.与王者英灵第一次交谈) {
                 ((GodFam)instance).TriggerOrgan[5] = true;
             } else if (((GodFam)instance).Step == Components.Instance.GodFam.Steps.与王者英灵第二次交谈) {
                 ((GodFam)instance).TriggerOrgan[6] = true;
             }
         }
         #endregion
     };
 }
Example #3
0
        private IEasingFunction ObterFuncaoDaAnimacao()
        {
            EasingFunctionBase funcaoDaAnimacao = null;
            
            switch (FuncaoDaAnimacao.SelectedValue.ToString())
            {
                case "BackEase":
                    funcaoDaAnimacao =  new BackEase();
                    break;
                case "BounceEase":
                    funcaoDaAnimacao = new BounceEase();
                    break;
                case "CircleEase":
                    funcaoDaAnimacao = new CircleEase();
                    break;
                case "CubicEase":
                    funcaoDaAnimacao = new CubicEase();
                    break;
                case "ElasticEase":
                    funcaoDaAnimacao = new ElasticEase();
                    break;
                case "ExponentialEase":
                    funcaoDaAnimacao = new ExponentialEase();
                    break;
                case "PowerEase":
                    funcaoDaAnimacao = new PowerEase();
                    break;
                case "QuadraticEase":
                    funcaoDaAnimacao = new QuadraticEase();
                    break;
                case "QuarticEase":
                    funcaoDaAnimacao = new QuarticEase();
                    break;
                case "QuinticEase":
                    funcaoDaAnimacao = new QuinticEase();
                    break;
                case "SineEase":
                    funcaoDaAnimacao = new SineEase();
                    break;
            }

            funcaoDaAnimacao.EasingMode = ObterModoDaAnimacao();
            return funcaoDaAnimacao;
        }
Example #4
0
        public void EasingFunctionModesTest()
        {
            PowerEase ease = new PowerEase { Power = 2 };

            ease.EasingMode = EasingMode.EaseIn;
            Assert.IsTrue(ease.Ease(0).IsClose(0));
            Assert.IsTrue(ease.Ease(0.3).IsClose(0.09));
            Assert.IsTrue(ease.Ease(0.7).IsClose(0.49));
            Assert.IsTrue(ease.Ease(1).IsClose(1));

            ease.EasingMode = EasingMode.EaseOut;
            Assert.IsTrue(ease.Ease(0).IsClose(0));
            Assert.IsTrue(ease.Ease(0.3).IsClose(0.51));
            Assert.IsTrue(ease.Ease(0.7).IsClose(0.91));
            Assert.IsTrue(ease.Ease(1).IsClose(1));

            ease.EasingMode = EasingMode.EaseInOut;
            Assert.IsTrue(ease.Ease(0).IsClose(0));
            Assert.IsTrue(ease.Ease(0.3).IsClose(0.18));
            Assert.IsTrue(ease.Ease(0.7).IsClose(0.82));
            Assert.IsTrue(ease.Ease(1).IsClose(1));
        }
Example #5
0
        private Storyboard CreateAnimation(IEnumerable<ExpandableWrapper> controls, bool visible)
        {
            Storyboard sb = new Storyboard();
            sb.FillBehavior = FillBehavior.HoldEnd;

            var ease = new PowerEase() { Power = 5 };
            var duration = TimeSpan.FromMilliseconds(700);

            foreach (var c in controls)
            {
                DoubleAnimation opacity = new DoubleAnimation(visible ? 1 : 0, duration);
                opacity.EasingFunction = ease;
                opacity.SetValue(Storyboard.TargetProperty, c);
                opacity.SetValue(Storyboard.TargetPropertyProperty, new PropertyPath(ExpandableWrapper.OpacityProperty));
                sb.Children.Add(opacity);

                // replace the current transform with one that's not currently locked by an old animation.
                ScaleTransform st = new ScaleTransform(c.Scale.ScaleX, c.Scale.ScaleY);
                if (Orientation == Orientation.Horizontal)
                    st.ScaleY = 1;
                else
                    st.ScaleX = 1;
                c.Scale = st;

                DoubleAnimation size = new DoubleAnimation(visible ? 1 : 0, duration);
                size.EasingFunction = ease;
                size.SetValue(Storyboard.TargetProperty, c);
                size.SetValue(Storyboard.TargetPropertyProperty,
                    new PropertyPath(Orientation == Orientation.Horizontal ? "LayoutTransform.ScaleX" : "LayoutTransform.ScaleY"));
                sb.Children.Add(size);

                c.Child.Focusable = visible && c.ChildFocusableDefault;
            }
            return sb;
        }
Example #6
0
        public void Switch(UIElement eIn, UIElement eOut, double duration)
        {
            // create storyboard
            var sb = new Storyboard();

            // make sure eIn is behind eOut
            if (eIn != null)
            {
                eIn.SetValue(Canvas.ZIndexProperty, 0);
                eIn.RenderTransform = null;
                eIn.Opacity = 1;
            }

            // rotate eOut from zero to 90
            if (eOut != null)
            {
                eOut.SetValue(Canvas.ZIndexProperty, 1);

                var ease = new PowerEase();
                ease.EasingMode = EasingMode.EaseOut;
                ease.Power = 3;

                var rt = new RotateTransform();
                eOut.RenderTransform = rt;
                var da = new DoubleAnimation();
                da.To = 90;
                da.Duration = TimeSpan.FromMilliseconds(duration);
                da.EasingFunction = ease;
                Storyboard.SetTargetProperty(da, new PropertyPath("Angle"));
                Storyboard.SetTarget(da, rt);
                sb.Children.Add(da);

                da = new DoubleAnimation();
                da.From = 1;
                da.To = 0;
                da.BeginTime = TimeSpan.FromMilliseconds(duration * .8);
                da.Duration = TimeSpan.FromMilliseconds(duration * .2);
                da.EasingFunction = ease;
                Storyboard.SetTargetProperty(da, new PropertyPath("Opacity"));
                Storyboard.SetTarget(da, eOut);
                sb.Children.Add(da);
            }

            // do it
            sb.Begin();
        }
Example #7
0
 private void Animate(TranslateTransform newTranslateTransform, ScaleTransform newScaleTransform, PlaneProjection newPlaneProjection, PowerEase ease = null)
 {
     myCurrentTransformData = new TransformData(newPlaneProjection, newTranslateTransform, newScaleTransform);
       UIUtil.StartAnimation(0.5,
                     new AnimationInfo(myTranslateTransform, new PropertyPath(TranslateTransform.XProperty), myTranslateTransform.X, newTranslateTransform.X, ease),
                     new AnimationInfo(myTranslateTransform, new PropertyPath(TranslateTransform.YProperty), myTranslateTransform.Y, newTranslateTransform.Y, ease),
                     new AnimationInfo(myScaleTransform, new PropertyPath(ScaleTransform.ScaleXProperty), myScaleTransform.ScaleX, newScaleTransform.ScaleX, ease),
                     new AnimationInfo(myScaleTransform, new PropertyPath(ScaleTransform.ScaleYProperty), myScaleTransform.ScaleY, newScaleTransform.ScaleY, ease),
                     new AnimationInfo(myScaleTransform, new PropertyPath(ScaleTransform.CenterXProperty), myScaleTransform.CenterX, newScaleTransform.CenterX, ease),
                     new AnimationInfo(myScaleTransform, new PropertyPath(ScaleTransform.CenterYProperty), myScaleTransform.CenterY, newScaleTransform.CenterY, ease),
                     new AnimationInfo(myPlaneProjection, new PropertyPath(PlaneProjection.RotationXProperty), myPlaneProjection.RotationX, newPlaneProjection.RotationX, ease),
                     new AnimationInfo(myPlaneProjection, new PropertyPath(PlaneProjection.LocalOffsetZProperty), myPlaneProjection.LocalOffsetZ, newPlaneProjection.LocalOffsetZ, ease),
                     new AnimationInfo(myPlaneProjection, new PropertyPath(PlaneProjection.LocalOffsetYProperty), myPlaneProjection.LocalOffsetY, newPlaneProjection.LocalOffsetY, ease));
 }
Example #8
0
        /// <summary>
        /// Close the player and go back to the movie page when the downloading of the movie has stopped
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">EventArgs</param>
        private void OnStoppedDownloadingMovie(object sender, EventArgs e)
        {
            DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                if (MediaPlayer != null && MediaPlayer.Source != null)
                {
                    MediaPlayer.Stop();
                    MediaPlayer.Close();
                    MediaPlayer.Source = null;
                    MediaPlayerIsPlaying = false;
                }

                #region Dispatcher Timer
                timer.Tick -= Timer_Tick;
                timer.Stop();
                #endregion

                ProgressBar.Visibility = Visibility.Collapsed;
                StopLoadingMovieButton.Visibility = Visibility.Collapsed;
                LoadingText.Visibility = Visibility.Collapsed;
                ProgressBar.Value = 0.0;

                #region Fade out opacity

                DoubleAnimationUsingKeyFrames opacityAnimation = new DoubleAnimationUsingKeyFrames();
                opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.5));
                PowerEase opacityEasingFunction = new PowerEase();
                opacityEasingFunction.EasingMode = EasingMode.EaseInOut;
                EasingDoubleKeyFrame startOpacityEasing = new EasingDoubleKeyFrame(0.0, KeyTime.FromPercent(0));
                EasingDoubleKeyFrame endOpacityEasing = new EasingDoubleKeyFrame(1.0, KeyTime.FromPercent(1.0),
                    opacityEasingFunction);
                opacityAnimation.KeyFrames.Add(startOpacityEasing);
                opacityAnimation.KeyFrames.Add(endOpacityEasing);

                Content.BeginAnimation(OpacityProperty, opacityAnimation);

                #endregion
            });
        }
Example #9
0
        /// <summary>
        /// Show content and hide progress when a movie is loaded
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">EventArgs</param>
        void OnLoadedMovie(object sender, EventArgs e)
        {
            DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                MovieProgressBar.Visibility = Visibility.Collapsed;
                MovieContainer.Visibility = Visibility.Visible;

                #region Fade in opacity

                DoubleAnimationUsingKeyFrames opacityAnimation = new DoubleAnimationUsingKeyFrames();
                opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.5));
                PowerEase opacityEasingFunction = new PowerEase();
                opacityEasingFunction.EasingMode = EasingMode.EaseInOut;
                EasingDoubleKeyFrame startOpacityEasing = new EasingDoubleKeyFrame(0.0, KeyTime.FromPercent(0));
                EasingDoubleKeyFrame endOpacityEasing = new EasingDoubleKeyFrame(1.0, KeyTime.FromPercent(1.0),
                    opacityEasingFunction);
                opacityAnimation.KeyFrames.Add(startOpacityEasing);
                opacityAnimation.KeyFrames.Add(endOpacityEasing);

                MovieContainer.BeginAnimation(OpacityProperty, opacityAnimation);

                #endregion
            });
        }
Example #10
0
        /// <summary>
        /// Fade in the movie page's opacity when a movie is loading
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">EventArgs</param>
        private void OnDownloadingMovie(object sender, EventArgs e)
        {
            DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                #region Fade in opacity
                DoubleAnimationUsingKeyFrames opacityAnimation = new DoubleAnimationUsingKeyFrames();
                opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.5));
                PowerEase opacityEasingFunction = new PowerEase();
                opacityEasingFunction.EasingMode = EasingMode.EaseInOut;
                EasingDoubleKeyFrame startOpacityEasing = new EasingDoubleKeyFrame(1.0, KeyTime.FromPercent(0));
                EasingDoubleKeyFrame endOpacityEasing = new EasingDoubleKeyFrame(0.0, KeyTime.FromPercent(1.0),
                    opacityEasingFunction);
                opacityAnimation.KeyFrames.Add(startOpacityEasing);
                opacityAnimation.KeyFrames.Add(endOpacityEasing);

                Content.BeginAnimation(OpacityProperty, opacityAnimation);
                #endregion
            });
        }
Example #11
0
        private void OnLoadedTrailer(object sender, TrailerLoadedEventArgs e)
        {
            if (!e.InError)
            {
                DispatcherHelper.CheckBeginInvokeOnUI(() =>
                {
                    #region Fade in opacity

                    DoubleAnimationUsingKeyFrames opacityAnimation = new DoubleAnimationUsingKeyFrames();
                    opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.5));
                    PowerEase opacityEasingFunction = new PowerEase();
                    opacityEasingFunction.EasingMode = EasingMode.EaseInOut;
                    EasingDoubleKeyFrame startOpacityEasing = new EasingDoubleKeyFrame(1.0, KeyTime.FromPercent(0));
                    EasingDoubleKeyFrame endOpacityEasing = new EasingDoubleKeyFrame(0.0, KeyTime.FromPercent(1.0),
                        opacityEasingFunction);
                    opacityAnimation.KeyFrames.Add(startOpacityEasing);
                    opacityAnimation.KeyFrames.Add(endOpacityEasing);

                    MovieContainer.BeginAnimation(OpacityProperty, opacityAnimation);

                    #endregion
                });

                TrailerPlayer.Source = new Uri(e.TrailerUrl);
                TrailerPlayer.Play();
            }
        }
Example #12
0
        /// <summary>
        /// Fade out opacity of the window, let the progress ring disappear and set to visible the NoMouvieFound label when movies are loaded
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">EventArgs</param>
        private void OnMoviesLoaded(object sender, NumberOfLoadedMoviesEventArgs e)
        {
            // We have to deal with the DispatcherHelper, otherwise we're having the classic cross-thread access exception
            DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                // We exclude exceptions like TaskCancelled when getting back results
                if ((e.NumberOfMovies == 0 && !e.IsExceptionThrown) || (e.NumberOfMovies != 0 && !e.IsExceptionThrown))
                {
                    ProgressRing.IsActive = false;

                    #region Fade out opacity
                    DoubleAnimationUsingKeyFrames opacityAnimation = new DoubleAnimationUsingKeyFrames();
                    opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.5));
                    PowerEase opacityEasingFunction = new PowerEase();
                    opacityEasingFunction.EasingMode = EasingMode.EaseInOut;
                    EasingDoubleKeyFrame startOpacityEasing = new EasingDoubleKeyFrame(0.2, KeyTime.FromPercent(0));
                    EasingDoubleKeyFrame endOpacityEasing = new EasingDoubleKeyFrame(1, KeyTime.FromPercent(1.0),
                        opacityEasingFunction);
                    opacityAnimation.KeyFrames.Add(startOpacityEasing);
                    opacityAnimation.KeyFrames.Add(endOpacityEasing);
                    ItemsList.BeginAnimation(OpacityProperty, opacityAnimation);
                    #endregion
                }

                var vm = DataContext as MoviesViewModel;
                if (vm != null)
                {
                    // If we searched movies and there's no result, display the NoMovieFound label (we exclude exceptions like TaskCancelled when getting back results)
                    if (!vm.Movies.Any() && e.NumberOfMovies == 0 && !e.IsExceptionThrown)
                    {
                        NoMouvieFound.Visibility = Visibility.Visible;
                    }
                }
            });
        }
Example #13
0
        public static PlotElementAnimation CreateAnimation(AnimationTransform transform, AnimationOrigin origin, Easing easing, bool indexDelay)
        {
            var sb = new Storyboard();
              var duration = new Duration(TimeSpan.FromSeconds(0.5));

              var style = new Style();
              style.TargetType = typeof(PlotElement);
              style.Setters.Add(new Setter(PlotElement.OpacityProperty, 0.0));

              if (transform == AnimationTransform.Scale)
            style.Setters.Add(new Setter(PlotElement.RenderTransformProperty, new ScaleTransform() { ScaleX = 0, ScaleY = 0 }));
              else if (transform == AnimationTransform.Rotation)
            style.Setters.Add(new Setter(PlotElement.RenderTransformProperty, new RotateTransform() { Angle = 180 }));

              var point = new Point(0.5, 0.5);
              switch (origin)
              {
            case AnimationOrigin.Bottom:
              point = new Point(0.5, 2);
              break;
            case AnimationOrigin.Top:
              point = new Point(0.5, -2);
              break;
            case AnimationOrigin.Left:
              point = new Point(-2, 0.5);
              break;
            case AnimationOrigin.Right:
              point = new Point(2, 0.5);
              break;
            case AnimationOrigin.TopLeft:
              point = new Point(2, -2);
              break;
            case AnimationOrigin.TopRight:
              point = new Point(-2, -2);
              break;
            case AnimationOrigin.BottomLeft:
              point = new Point(2, 2);
              break;
            case AnimationOrigin.BottomRight:
              point = new Point(-2, 2);
              break;
            default:
              break;
              }

              style.Setters.Add(new Setter(PlotElement.RenderTransformOriginProperty, point));

              var da = new DoubleAnimation() { From = 0, To = 1, Duration = duration };
              Storyboard.SetTargetProperty(da, new PropertyPath("Opacity"));
              sb.Children.Add(da);

              if (transform == AnimationTransform.Scale)
              {
            var da2 = new DoubleAnimation() { From = 0, To = 1, Duration = duration };
            Storyboard.SetTargetProperty(da2, new PropertyPath("(RenderTransform).ScaleX"));

            var da3 = new DoubleAnimation() { From = 0, To = 1, Duration = duration };
            Storyboard.SetTargetProperty(da3, new PropertyPath("(RenderTransform).ScaleY"));

            sb.Children.Add(da2);
            sb.Children.Add(da3);
              }
              else if (transform == AnimationTransform.Rotation)
              {
            var da2 = new DoubleAnimation() { To = 0, Duration = duration };
            Storyboard.SetTargetProperty(da2, new PropertyPath("(RenderTransform).Angle"));
            sb.Children.Add(da2);
              }

              if (indexDelay)
              {
            foreach (var anim in sb.Children)
              PlotElementAnimation.SetIndexDelay(anim, 0.5);
              }

            #if CLR40
              if (easing != Easing.None)
              {
            IEasingFunction ef = null;

            switch (easing)
            {
              case Easing.BackEase:
            ef = new BackEase(); break;
              case Easing.BounceEase:
            ef = new BounceEase(); break;
              case Easing.CircleEase:
            ef = new CircleEase(); break;
              case Easing.CubicEase:
            ef = new CubicEase(); break;
              case Easing.ElasticEase:
            ef = new ElasticEase(); break;
              case Easing.ExponentialEase:
            ef = new ExponentialEase(); break;
              case Easing.PowerEase:
            ef = new PowerEase(); break;
              case Easing.QuadraticEase:
            ef = new QuadraticEase(); break;
              case Easing.QuarticEase:
            ef = new QuarticEase(); break;
              case Easing.QuinticEase:
            ef = new QuinticEase(); break;
              case Easing.SineEase:
            ef = new SineEase(); break;

              default:
            break;
            }

            foreach (DoubleAnimation anim in sb.Children)
              anim.EasingFunction = ef;
              }
            #endif

              return new PlotElementAnimation() { Storyboard = sb, SymbolStyle = style };
        }
        // TODO:움직이기 전 최초 좌표를 설정해줘야함. 지금은 임의로 -500값으로 진행중.
        // 위쪽에서 등장
        private void MoveTTB(FrameworkElement shape)
        {
            double x = shape.Margin.Left;
            double y = shape.Margin.Top;
            double yMove = 500;

            PowerEase power = new PowerEase();
            ThicknessAnimation linearAnimation = new ThicknessAnimation();
            linearAnimation.From = new Thickness(x, y - yMove, 0, 0);
            linearAnimation.To = new Thickness(x, y, 0, 0);
            linearAnimation.EasingFunction = power;

            shape.BeginAnimation(MarginProperty, linearAnimation);
        }
        private void StartAnimation()
        {
            if(_parent == null)
            {
                return ;
            }

            var parentRect = GetParentWindowRect();

            DoubleAnimation oLabelAngleAnimation = new DoubleAnimation();
            oLabelAngleAnimation.From = parentRect.Bottom;
            oLabelAngleAnimation.To = Math.Max(parentRect.Top, 0);
            oLabelAngleAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500));

            var ease = new PowerEase();
            ease.Power = 8;
            ease.EasingMode = EasingMode.EaseInOut;
            oLabelAngleAnimation.EasingFunction = ease;

            Storyboard.SetTarget(oLabelAngleAnimation, this);
            Storyboard.SetTargetProperty(oLabelAngleAnimation, new PropertyPath("(Window.Top)"));

            Storyboard board = new Storyboard();

            board.Children.Add(oLabelAngleAnimation);

            oLabelAngleAnimation = new DoubleAnimation();
            oLabelAngleAnimation.From = parentRect.Left;
            oLabelAngleAnimation.To = parentRect.Right - this.Width;
            oLabelAngleAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500));
            oLabelAngleAnimation.EasingFunction = ease;

            Storyboard.SetTarget(oLabelAngleAnimation, this);
            Storyboard.SetTargetProperty(oLabelAngleAnimation, new PropertyPath("(Window.Left)"));

            board.Children.Add(oLabelAngleAnimation);

            board.Begin();
        }
        private void ResetWidthSize()
        {
            var storyboard = new Storyboard();
            var animation = new DoubleAnimation
            {
                From = _view.Width,
                To = GetResetSize(),
                Duration = TimeSpan.FromMilliseconds(250)
            };

            var ease = new PowerEase();
            ease.Power = 4;
            ease.EasingMode = EasingMode.EaseInOut;
            animation.EasingFunction = ease;

            storyboard.Completed += storyboardWidthChange_Completed;

            Storyboard.SetTargetProperty(animation, new PropertyPath("Width"));
            storyboard.Children.Add(animation);

            _view.BeginStoryboard(storyboard);
        }