Exemple #1
0
        private void MainMenuBar_MouseEnter(object sender, MouseEventArgs e)
        {
            DoubleAnimation anim = new DoubleAnimation(35d, new Duration(TimeSpan.FromSeconds(0.2d)));

            anim.EasingFunction = new ExponentialEase();
            MainMenuBar.BeginAnimation(HeightProperty, anim);
        }
Exemple #2
0
        private void MainMenuBar_MouseLeave(object sender, MouseEventArgs e)
        {
            DoubleAnimation anim = new DoubleAnimation(0d, new Duration(TimeSpan.FromSeconds(0.2d)));

            anim.EasingFunction = new ExponentialEase();

            if (MainMenuBar.Height == 35d)
            {
                Thread.Sleep(TimeSpan.FromSeconds(0.5d));
            }
            MainMenuBar.BeginAnimation(HeightProperty, anim);
        }