コード例 #1
0
        private static void RTTranslateYAnimation(FrameworkElement Item, DoubleAnimation Ani, Action OnCompleted, SetExtentAnimationTimelineDelegate SetExtentValue)
        {
            TranslateTransform Transform = CuxAnimation1.GetRTInstance <TranslateTransform>(Item);

            if (Transform != null)
            {
                if (SetExtentValue != null)
                {
                    SetExtentValue(Ani);
                }
                Ani.Completed += new EventHandler(
                    delegate(object sender, EventArgs e)
                {
                    if (!Ani.AutoReverse)
                    {
                        Transform.Y = Ani.To.Value;
                        if (OnCompleted != null && Transform.Y == Ani.To.Value)
                        {
                            OnCompleted();
                        }
                    }
                    else
                    {
                        if (OnCompleted != null)
                        {
                            OnCompleted();
                        }
                    }
                });
                Transform.BeginAnimation(TranslateTransform.YProperty, Ani);
            }
        }
コード例 #2
0
        public static void HeightAnimation(FrameworkElement Item, double FromValue, double ToValue, double Second, Action OnCompleted, SetExtentAnimationTimelineDelegate SetExtentValue)
        {
            DoubleAnimation Ani = new DoubleAnimation(FromValue, ToValue, new Duration(TimeSpan.FromSeconds(Second)), FillBehavior.Stop);

            CuxAnimation1.HeightAnimation(Item, Ani, OnCompleted, SetExtentValue);
        }
コード例 #3
0
 public static void RTTranslateYAnimation(FrameworkElement Item, double FromValue, double ToValue, double Second, Action OnCompleted)
 {
     CuxAnimation1.RTTranslateYAnimation(Item, FromValue, ToValue, Second, OnCompleted, DefaultSetExtentValue);
 }
コード例 #4
0
 public static void HeightAnimation(FrameworkElement Item, double ToValue, double Second, Action OnCompleted)
 {
     CuxAnimation1.HeightAnimation(Item, ToValue, Second, OnCompleted, DefaultSetExtentValue);
 }
コード例 #5
0
 public static void CanvasBottomAnimation(FrameworkElement Item, double FromValue, double ToValue, double Second, Action OnCompleted)
 {
     CuxAnimation1.CanvasBottomAnimation(Item, FromValue, ToValue, Second, OnCompleted, DefaultSetExtentValue);
 }
コード例 #6
0
        public static void MarginAnimation(FrameworkElement Item, Thickness FromValue, Thickness ToValue, double Second, Action OnCompleted, SetExtentAnimationTimelineDelegate SetExtentValue)
        {
            ThicknessAnimation Ani = new ThicknessAnimation(FromValue, ToValue, new Duration(TimeSpan.FromSeconds(Second)), FillBehavior.Stop);

            CuxAnimation1.MarginAnimation(Item, Ani, OnCompleted, SetExtentValue);
        }
コード例 #7
0
 public static void MarginAnimation(FrameworkElement Item, Thickness FromValue, Thickness ToValue, double Second, Action OnCompleted)
 {
     CuxAnimation1.MarginAnimation(Item, FromValue, ToValue, Second, OnCompleted, DefaultSetExtentValue);
 }