예제 #1
0
        public static async Task FadeOutBrush(this Page page, float seconds)
        {
            // Create the storyboard
            var sb = new Storyboard();

            // Add fade out animation
            sb.AddFadeOutBrush(seconds);
            // Start animating
            sb.Begin(page);
            // Make page visible
            page.Visibility = Visibility.Visible;
            //Wait for it to finish
            await Task.Delay((int)(seconds * 1000));
        }