Пример #1
0
        private void Grid_MouseLeave(object sender, MouseEventArgs e)
        {
            DoubleAnimation das = new DoubleAnimation(50, TimeSpan.FromSeconds(0.3));

            Hidden.BeginAnimation(WidthProperty, das);
            //-241,-1,-1,-1
            ThicknessAnimation tas = new ThicknessAnimation(new Thickness(-241, -1, -1, -1), TimeSpan.FromSeconds(0.3));

            HiddenContent.BeginAnimation(Rectangle.MarginProperty, tas);
        }
Пример #2
0
        private void Grid_MouseEnter(object sender, MouseEventArgs e)
        {
            DoubleAnimation das = new DoubleAnimation(300, TimeSpan.FromSeconds(0.3));

            Hidden.BeginAnimation(WidthProperty, das);
            ThicknessAnimation tas = new ThicknessAnimation(new Thickness(10, 1, -2, -3), TimeSpan.FromSeconds(0.3));

            HiddenContent.BeginAnimation(Rectangle.MarginProperty, tas);
            //10,1,-2,-3
        }