Example #1
0
        private void ConfigureAnimations()
        {
            ElementCompositionPreview.SetIsTranslationEnabled(paraimage, true);
            ElementCompositionPreview.SetImplicitShowAnimation(paraimage, VisualHelpers.CreateVerticalOffsetAnimationFrom(0.55, -150));
            ElementCompositionPreview.SetImplicitHideAnimation(paraimage, VisualHelpers.CreateVerticalOffsetAnimationTo(0.55, -150));
            ElementCompositionPreview.SetImplicitHideAnimation(paraimage, VisualHelpers.CreateOpacityAnimation(0.4, 0));

            Canvas.SetZIndex(this, 1);
            ElementCompositionPreview.SetImplicitHideAnimation(this, VisualHelpers.CreateOpacityAnimation(0.4, 0));
        }
        private void ConfigureAnimations()
        {
            ElementCompositionPreview.SetIsTranslationEnabled(TitleElement, true);
            ElementCompositionPreview.SetImplicitShowAnimation(TitleElement,
                                                               VisualHelpers.CreateAnimationGroup(
                                                                   VisualHelpers.CreateVerticalOffsetAnimationFrom(0.45, -50f),
                                                                   VisualHelpers.CreateOpacityAnimation(0.5)));

            Canvas.SetZIndex(this, 1);
            ElementCompositionPreview.SetImplicitHideAnimation(this, VisualHelpers.CreateOpacityAnimation(0.4, 0));

            var contentShowAnimations    = VisualHelpers.CreateVerticalOffsetAnimation(0.45, 50, 0.2);
            var contentOpacityAnimations = VisualHelpers.CreateOpacityAnimation(.8);

            ElementCompositionPreview.SetIsTranslationEnabled(ContentElement, true);
            ElementCompositionPreview.SetImplicitShowAnimation(
                ContentElement,
                VisualHelpers.CreateAnimationGroup(contentShowAnimations, contentOpacityAnimations));

            ElementCompositionPreview.SetImplicitHideAnimation(ContentElement, VisualHelpers.CreateVerticalOffsetAnimationTo(0.4, 50));
        }
Example #3
0
        private void ConfigureAnimations()
        {
            // TODO: collapse all this into a single helper method
            ElementCompositionPreview.SetIsTranslationEnabled(TopBorder, true);
            ElementCompositionPreview.SetImplicitShowAnimation(TopBorder, VisualHelpers.CreateVerticalOffsetAnimationFrom(0.45, -450f));
            ElementCompositionPreview.SetImplicitHideAnimation(TopBorder, VisualHelpers.CreateVerticalOffsetAnimationTo(0.45, -30));

            // ListContent:
            var listContentShowAnimations    = VisualHelpers.CreateVerticalOffsetAnimation(0.45, 50, 0.2);
            var listContentOpacityAnimations = VisualHelpers.CreateOpacityAnimation(.8);

            ElementCompositionPreview.SetIsTranslationEnabled(ListContent, true);
            ElementCompositionPreview.SetImplicitShowAnimation(
                ListContent,
                VisualHelpers.CreateAnimationGroup(listContentShowAnimations, listContentOpacityAnimations));

            ElementCompositionPreview.SetImplicitHideAnimation(ListContent, VisualHelpers.CreateVerticalOffsetAnimationTo(0.4, 50));

            // Set Z index to force this page to the top during the hide animation
            Canvas.SetZIndex(this, 1);
            ElementCompositionPreview.SetImplicitHideAnimation(this, VisualHelpers.CreateOpacityAnimation(0.4, 0));
        }
Example #4
0
        private void ConfigureAnimations()
        {
            ElementCompositionPreview.SetIsTranslationEnabled(title, true);
            ElementCompositionPreview.SetImplicitShowAnimation(title,
                                                               VisualHelpers.CreateAnimationGroup(
                                                                   VisualHelpers.CreateVerticalOffsetAnimationFrom(0.45, -50f),
                                                                   VisualHelpers.CreateOpacityAnimation(0.5)
                                                                   ));

            // favorites listview
            ElementCompositionPreview.SetIsTranslationEnabled(favoriteListView, true);
            ElementCompositionPreview.SetImplicitShowAnimation(
                favoriteListView,
                VisualHelpers.CreateAnimationGroup(
                    VisualHelpers.CreateVerticalOffsetAnimation(0.55, 50, 0),
                    VisualHelpers.CreateOpacityAnimation(0.5)));

            ElementCompositionPreview.SetImplicitHideAnimation(favoriteListView, VisualHelpers.CreateVerticalOffsetAnimationTo(0.4, 50));
            ElementCompositionPreview.SetImplicitHideAnimation(favoriteListView, VisualHelpers.CreateOpacityAnimation(0.4, 0));

            Canvas.SetZIndex(this, 1);
            ElementCompositionPreview.SetImplicitHideAnimation(this, VisualHelpers.CreateOpacityAnimation(0.4, 0));
        }