private void AnimateHeight(double containerHeight, DependencyObject target)
        {
            var heightStoryBoard = new Storyboard();
            var heightAnimation  = AnimationUtilities.PrepareAnimation(0, containerHeight, target, HeightProperty, 0.3f);

            //var widthAnimation = AnimationUtilities.PrepareAnimation(10, containerWidth, target, WidthProperty, 1);
            heightStoryBoard.Children.Add(heightAnimation);
            heightStoryBoard.Begin();
        }
예제 #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var animation = AnimationUtilities.PrepareAnimation(10, Width, this, WidthProperty, 0.7f);

            this.BeginAnimation(WidthProperty, animation);
        }