Пример #1
0
        public static void Animate(Page _this, float _time, float from, float to, DependencyProperty property , EventHandler eh)
        {
            DoubleAnimation da = new DoubleAnimation(from, to, new Duration(TimeSpan.FromSeconds(_time)));
            _this.BeginAnimation(property, da);

            da.Completed += eh;
        }
Пример #2
0
        public static void NavigateFromTo(Page current, Page next)
        {
            nextpagesaved = next;
            prevpagesaved = current;
            current.BeginAnimation(Page.OpacityProperty, fadeout);

            timer3.Tick += new EventHandler(
                (object s, EventArgs e) =>
                {
                    timer3.Stop();
                    prevpagesaved.NavigationService.Navigate(nextpagesaved);

                    nextpagesaved.BeginAnimation(Page.OpacityProperty, fadein);

                });
            timer3.Interval = new TimeSpan(0, 0, 0, 0, (int)(animeInterval * 1000));
            timer3.Start();
        }
Пример #3
0
 public static void Animate(Page _this, float _time, float from, float to, DependencyProperty property)
 {
     DoubleAnimation da = new DoubleAnimation(from, to, new Duration(TimeSpan.FromSeconds(_time)));
     _this.BeginAnimation(property, da);
     
 }