Exemple #1
0
        public static void BeginAnimationAngle(this UIElement element, double from, double to, double duration = 1000, Action <UIElement> Completed = null, Action <Storyboard> init = null)
        {
            var tran = element.GetTransform <RotateTransform>();

            if (tran == null)
            {
                return;
            }

            element.BegionDoubleStoryBoard(from, to, duration / 1000.0, "(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)", Completed, init);
        }
Exemple #2
0
 public static void BeginAnimationOpacity(this UIElement element, double from, double to, double duration = 1000, Action <UIElement> Completed = null, Action <Storyboard> init = null)
 {
     element.BegionDoubleStoryBoard(from, to, duration / 1000.0, UIElement.OpacityProperty.Name, Completed);
 }
Exemple #3
0
 public static void Wait(this UIElement element, double duration = 1000, Action <UIElement> Completed = null)
 {
     element.BegionDoubleStoryBoard(1, 1, duration / 1000.0, "Opacity", Completed);
 }