//Animations public void AllRectanglesLoaded() { //animation code DoubleAnimation arraysRectangle = new DoubleAnimation() { From = 0, To = 920, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; DoubleAnimation exceptionsRectangle = new DoubleAnimation() { From = 0, To = 920, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; DoubleAnimation methodsRectangle = new DoubleAnimation() { From = 0, To = 920, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; DoubleAnimation textFilesRectangle = new DoubleAnimation() { From = 0, To = 920, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; //calling the animation code //reffering to the XAML objects ArraysRec.BeginAnimation(WidthProperty, arraysRectangle); ExceptionsRec.BeginAnimation(WidthProperty, exceptionsRectangle); MethodsRec.BeginAnimation(WidthProperty, methodsRectangle); TextFilesRec.BeginAnimation(WidthProperty, textFilesRectangle); }
public void AllRectanglesUnloaded() { DoubleAnimation arrayRectangle = new DoubleAnimation() { From = 920, To = 0, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; DoubleAnimation exceptionRectangle = new DoubleAnimation() { From = 920, To = 0, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; DoubleAnimation methodRectangle = new DoubleAnimation() { From = 920, To = 0, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; DoubleAnimation textFilesRectangle = new DoubleAnimation() { From = 920, To = 0, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; ArraysRec.BeginAnimation(WidthProperty, arrayRectangle); ExceptionsRec.BeginAnimation(WidthProperty, exceptionRectangle); MethodsRec.BeginAnimation(WidthProperty, methodRectangle); TextFilesRec.BeginAnimation(WidthProperty, textFilesRectangle); }