Esempio n. 1
0
        /// <summary>
        /// Navigate back from detail page
        /// </summary>
        private async void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            if (this._navigateItem == null)
            {
                return;
            }
            var animation = ConnectedAnimationService.GetForCurrentView().GetAnimation(Util.FROM_BOOK_DETAIL);

            if (animation != null)
            {
                animation.Configuration = new DirectConnectedAnimationConfiguration();
                switch (this._navigateType)
                {
                case BookSummaryCollectionType.NewBooks:
                    NBGrid.ScrollIntoView(this._navigateItem);
                    await NBGrid.TryStartConnectedAnimationAsync(animation, this._navigateItem, "NBImage");

                    break;

                case BookSummaryCollectionType.TopBooks:
                    TBGrid.ScrollIntoView(this._navigateItem);
                    await TBGrid.TryStartConnectedAnimationAsync(animation, this._navigateItem, "TBImage");

                    break;

                case BookSummaryCollectionType.PersonalRecommands:
                    PRGrid.ScrollIntoView(this._navigateItem);
                    await PRGrid.TryStartConnectedAnimationAsync(animation, this._navigateItem, "PRImage");

                    break;

                default:
                    return;
                }
                this._navigateType = BookSummaryCollectionType.Other;
                this._navigateItem = null;
            }
        }