Esempio n. 1
0
        private void FruitsList_Loaded(object sender, RoutedEventArgs e)
        {
            if (null == _incomingObject)
            {
                return;
            }
            ContainerVisual tempContainer;

            //Execute animations and re-parenting when layout is available so that we know where to take the visual for final animation.
            ContinuityHelper.InitiateContinuity(_incomingObject.rectImage, _incomingObject.imageContainerVisual, out tempContainer);
            _incomingObject.imageContainerVisual = tempContainer;
        }
Esempio n. 2
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            ContainerVisual tempConatinerVisual;

            //Run animations and re-parenting when page is loaded and elements are available on page.
            ContinuityHelper.InitiateContinuity(HeroRectangle, _parameterObject.imageContainerVisual, out tempConatinerVisual);

            //set Application Parameters to move between pages.
            _parameterObject.imageContainerVisual = tempConatinerVisual;
            var coordinate = HeroRectangle.TransformToVisual(Window.Current.Content);

            DetailText.Visibility = Visibility.Visible;
        }
Esempio n. 3
0
        private void DetailsPage_BackRequested(object sender, Windows.UI.Core.BackRequestedEventArgs e)
        {
            if (_rootFrame.CanGoBack && !e.Handled)
            {
                //Set up visuals so that it is reparented to root frame and visible when pages change
                ContainerVisual newContainerVisual;
                ContinuityHelper.SetupContinuity(_parameterObject.imageContainerVisual, HeroRectangle, out newContainerVisual);
                e.Handled = true;
                _parameterObject.imageContainerVisual = newContainerVisual;

                Windows.UI.Core.SystemNavigationManager.GetForCurrentView().BackRequested -= DetailsPage_BackRequested;
                //Go back to previous page
                _rootFrame.GoBack();
            }
        }
Esempio n. 4
0
        private void FruitsList_ItemClick(object sender, ItemClickEventArgs e)
        {
            //Set up item before user naivate
            //Hook up clicked item's composition visual to the rootframe and update data source with new contianervisual for further reference.
            //Hook up containerVisual to UIElement so that you can easily query its children and manipulate SpriteVisual.
            ContainerVisual tempContainer;

            try
            {
                ContinuityHelper.SetupContinuity((e.ClickedItem as Item).imageContainerVisual, (e.ClickedItem as Item).rectImage, out tempContainer);

                //Update datasourece with new containerVisual for future refernece
                (e.ClickedItem as Item).imageContainerVisual = tempContainer;

                //keep track of object that was sent in case of back button click.
                _incomingObject = e.ClickedItem as Item;
                //navigate to new page
                this.Frame.Navigate(typeof(DetailsPage), e.ClickedItem);
            }
            catch
            {
                throw;
            }
        }