0

I am working on animation to a window in C# and WPF. In a simple 2 window application I want a window to get the coordinates of previous window and when it is loaded I want to animate its height property from 0 to previous window's height. I have searched many posts like slide effect to rectangle or image but i am unable to apply them to a window. Please help me about sliding height of a window when it is loaded. Please post any code or project link if you have got this thing to work Thanks in advance.

H.B.
  • 166,899
  • 29
  • 327
  • 400

1 Answers1

1

You Can play around DoubleAnimation

            DoubleAnimation anim = new DoubleAnimation();
            anim.From = 125;   //Height of the container before animation
            anim.To = 0;       //Height of the container after animation
            anim.SpeedRatio = 3;
            mainWindow.BeginAnimation(Window.HeightProperty, anim);
Andrew
  • 11
  • 1