Ejemplo n.º 1
0
        public static async Task SlideAndFadeInFromLeftAsync(this FrameworkElement element, float seconds = 0.3f, bool keepMargin = true, int width = 0)
        {
            var storyBoard = new Storyboard();

            storyBoard.AddSlideFromLeft(seconds, width == 0 ? element.ActualWidth : width, keepMargin: keepMargin);
            storyBoard.AddFadeInAugment(seconds);
            storyBoard.Begin(element);
            element.Visibility = Visibility.Visible;
            await Task.Delay((int)seconds * 1000);
        }
Ejemplo n.º 2
0
        public static async Task SlideAndFadeInFromRightAsync(this Page page, float seconds, bool keepMargin = true)
        {
            var storyBoard = new Storyboard();

            storyBoard.AddSlideFromRight(seconds, page.WindowWidth, keepMargin: keepMargin);
            storyBoard.AddFadeInAugment(seconds);
            storyBoard.Begin(page);
            page.Visibility = Visibility.Visible;
            await Task.Delay((int)seconds * 1000);
        }