Ejemplo n.º 1
0
        public static void BlendIn(this StatusBar bar)
        {
            bar.Visibility = Visibility.Visible;
            bar.SetValue(Grid.RowProperty, 3);
            bar.SetValue(Grid.RowSpanProperty, 1);
            bar.SetValue(Panel.ZIndexProperty, 1000);
            bar.SetValue(FrameworkElement.VerticalAlignmentProperty, VerticalAlignment.Stretch);

            // The sequence of calls in this method is important.
            // Don't change the layout after the animation has started.
            // The storyboard must be invoked last.
            var story = (Storyboard)bar.FindResource("StatusBarBlendInStoryboard");

            story.Begin();
        }