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); } }
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); }
public static void RTTranslateYAnimation(FrameworkElement Item, double FromValue, double ToValue, double Second, Action OnCompleted) { CuxAnimation1.RTTranslateYAnimation(Item, FromValue, ToValue, Second, OnCompleted, DefaultSetExtentValue); }
public static void HeightAnimation(FrameworkElement Item, double ToValue, double Second, Action OnCompleted) { CuxAnimation1.HeightAnimation(Item, ToValue, Second, OnCompleted, DefaultSetExtentValue); }
public static void CanvasBottomAnimation(FrameworkElement Item, double FromValue, double ToValue, double Second, Action OnCompleted) { CuxAnimation1.CanvasBottomAnimation(Item, FromValue, ToValue, Second, OnCompleted, DefaultSetExtentValue); }
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); }
public static void MarginAnimation(FrameworkElement Item, Thickness FromValue, Thickness ToValue, double Second, Action OnCompleted) { CuxAnimation1.MarginAnimation(Item, FromValue, ToValue, Second, OnCompleted, DefaultSetExtentValue); }