public void NavigateToPage(INavigateMoveDirection moveDirection)
        {
            // if we're navigating to this flipview page,
            // we need to know which direction we're coming from
            // so that we know which page in the flipview to show
            switch (moveDirection)
            {
            case INavigateMoveDirection.Backward:
                // moving backwards to get here, so set to the last page in the flipview
                this.DeviceModeFlipView.SelectedIndex = 2;
                break;

            case INavigateMoveDirection.Forward:
                // moving forwards, so set to first
                this.DeviceModeFlipView.SelectedIndex = 0;
                break;

            case INavigateMoveDirection.Unknown:
            default:
                // don't do anything for Unknown
                break;
            }

            // animations in
            // propagate navigation to child flipview pages on first navigate from outer FV page
            INavigate navigatePage = (INavigate)((FlipViewItemEx)this.DeviceModeFlipView.SelectedItem).GetChildViewAsObject();

            navigatePage.NavigateToPage(moveDirection);
        }
        public void NavigateToPage(INavigateMoveDirection moveDirection)
        {
            // animations in
            AnimationHelper.PerformPageEntranceAnimation(this);

            rBtnLeft.StartEntranceAnimation();
            rBtnLeft.StartRadiateAnimation();
        }
        private void FlipViewEx_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            // stop the page timer
            if (null != _pageMoveTimer)
            {
                _pageMoveTimer.Stop();
            }

            // if we have a bottom nav bar
            if (null != this.BottomNavBar)
            {
                // get the sender
                if (sender is FlipViewEx flipView)
                {
                    // navigate from the previous page
                    if (null != _previousPage)
                    {
                        _previousPage.NavigateFromPage();
                    }

                    // navigate to the new page
                    if (null != flipView.SelectedItem)
                    {
                        INavigateMoveDirection moveDirection = INavigateMoveDirection.Unknown;

                        // get the pageIndex of the new page
                        int nextPageIndex = flipView.SelectedIndex;

                        // find the index of the previous page
                        int previousPageIndex = flipView.GetIndexOfChildView(_previousPage);

                        // if we got it
                        if (-1 != previousPageIndex)
                        {
                            // are we moving forward or backward to get to the new page?
                            if (previousPageIndex < nextPageIndex)
                            {
                                moveDirection = INavigateMoveDirection.Forward;
                            }
                            else if (nextPageIndex < previousPageIndex)
                            {
                                moveDirection = INavigateMoveDirection.Backward;
                            }
                        }

                        // save the current page so we can navigate away from it later
                        _previousPage = (INavigate)((FlipViewItemEx)flipView.SelectedItem).GetChildViewAsObject();

                        // navigate to it
                        _previousPage.NavigateToPage(moveDirection);

                        // tell the navbar to move to it
                        this.BottomNavBar.MoveToPageIndex(nextPageIndex, (INavigateMoveDirection.Forward == moveDirection));
                    }
                }
            }
        }
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     if (BestOfMicrosoftPage.Current.HasLoaded)
     {
         SDX.Toolkit.Helpers.AnimationHelper.PerformPageEntranceAnimation(this);
     }
     else
     {
         BestOfMicrosoftPage.Current.HasNavigatedTo = true;
     }
 }
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     if (ExperienceInnovationPage.Current.HasLoaded)
     {
         AnimatePageEntrance();
     }
     else
     {
         ExperienceInnovationPage.Current.HasNavigatedTo = true;
     }
 }
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     if (AccessoriesDialPage.Current.HasLoaded)
     {
         AnimatePageEntrance();
     }
     else
     {
         AccessoriesDialPage.Current.HasNavigatedTo = true;
     }
 }
Esempio n. 7
0
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     if (ExperienceSpeakersPage.Current.HasLoaded)
     {
         AnimationHelper.PerformPageEntranceAnimation(this);
     }
     else
     {
         ExperienceSpeakersPage.Current.HasNavigatedTo = true;
     }
 }
Esempio n. 8
0
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     // animations in
     if (ExperiencePerformancePage.Current.HasLoaded)
     {
         AnimatePageEntrance();
     }
     else
     {
         ExperiencePerformancePage.Current.HasNavigatedTo = true;
     }
 }
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     ShowPopup();
     if (this.HasLoaded)
     {
         AnimatePageEntrance();
     }
     else
     {
         this.HasNavigatedTo = true;
     }
 }
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     // animations in
     if (AudioListenPage.Current.HasLoaded)
     {
         AnimatePageEntrance();
     }
     else
     {
         this.HasNavigatedTo = true;
     }
 }
Esempio n. 11
0
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     // animations in
     if (ComparePage.Current.HasLoaded)
     {
         AnimatePageEntrance();
     }
     else
     {
         ComparePage.Current.HasNavigatedTo = true;
     }
 }
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     // animations in
     if (ExperienceDayPlayPage.Current.HasLoaded)
     {
         AnimationHelper.PerformPageEntranceAnimation(this);
         this.ForzaPlayer.StartPlayer();
     }
     else
     {
         ExperienceDayPlayPage.Current.HasNavigatedTo = true;
     }
 }
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     SDX.Toolkit.Helpers.AnimationHelper.PerformPageEntranceAnimation(this);
 }
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     // animations in
     //AnimationHelper.PerformPageEntranceAnimation(this);
 }
Esempio n. 15
0
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
     // animations in
 }
Esempio n. 16
0
 public void NavigateToPage(INavigateMoveDirection moveDirection)
 {
 }
        private void DeviceModeFlipView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if ((null != this.DeviceModeFlipView) && (null != this.DeviceModeSlider))
            {
                // navigate from the previous page
                if (null != _previousPage)
                {
                    _previousPage.NavigateFromPage();
                }

                // navigate to the current page
                if (null != this.DeviceModeFlipView.SelectedItem)
                {
                    INavigateMoveDirection moveDirection = INavigateMoveDirection.Unknown;

                    // get the pageIndex of the new page
                    int nextPageIndex = this.DeviceModeFlipView.SelectedIndex;


                    // find the index of the previous page
                    int previousPageIndex = this.DeviceModeFlipView.Items.IndexOf(_previousPage);

                    // if we got it
                    if (-1 != previousPageIndex)
                    {
                        // are we moving forward or backward?
                        if (previousPageIndex < nextPageIndex)
                        {
                            moveDirection = INavigateMoveDirection.Forward;
                        }
                        else if (nextPageIndex < previousPageIndex)
                        {
                            moveDirection = INavigateMoveDirection.Backward;
                        }
                    }

                    // save the current page so we can navigate from it
                    _previousPage = (INavigate)((FlipViewItemEx)this.DeviceModeFlipView.SelectedItem).GetChildViewAsObject();

                    // navigate to it
                    _previousPage.NavigateToPage(moveDirection);

                    // telemetry
                    TelemetryService.Current?.LogTelemetryEvent(TelemetryEvents.ViewExperience);
                }

                // update slider
                switch (this.DeviceModeFlipView.SelectedIndex)
                {
                case 0:
                    // to avoid infinite event loops, only update if it's not already set to the new value
                    if (DeviceModeSliderSnapPositions.Studio != this.DeviceModeSlider.Position)
                    {
                        this.DeviceModeSlider.SnapTo(DeviceModeSliderSnapPositions.Studio);
                    }
                    break;

                case 1:
                    // to avoid infinite event loops, only update if it's not already set to the new value
                    if (DeviceModeSliderSnapPositions.Laptop != this.DeviceModeSlider.Position)
                    {
                        this.DeviceModeSlider.SnapTo(DeviceModeSliderSnapPositions.Laptop);
                    }
                    break;

                case 2:
                    // to avoid infinite event loops, only update if it's not already set to the new value
                    if (DeviceModeSliderSnapPositions.Tablet != this.DeviceModeSlider.Position)
                    {
                        this.DeviceModeSlider.SnapTo(DeviceModeSliderSnapPositions.Tablet);
                    }
                    break;
                }

                this.RaiseSelectionChangedEvent(this);
            }
        }
        private void FlipViewEx_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            // if the count of e.AddedItems == 1, then the SelectedIndex has actually
            // changed. if it's equal to 3 (the number of panels loaded in a VirtualizingStackPanel),
            // then this isn't a real change in the SelectedIndex, and we'll ignore it.
            if (3 != e.AddedItems.Count)
            {
                // stop the page timer
                if (null != _pageMoveTimer)
                {
                    _pageMoveTimer.Stop();
                }
            }

            // if we have a bottom nav bar
            if (null != this.BottomNavBar)
            {
                // get the sender
                if (sender is FlipViewEx flipView)
                {
                    // navigate from the previous page
                    if (null != _previousPage)
                    {
                        _previousPage.NavigateFromPage();
                    }

                    // navigate to the new page
                    if (null != flipView.SelectedItem)
                    {
                        INavigateMoveDirection moveDirection = INavigateMoveDirection.Unknown;

                        // get the pageIndex of the new page
                        int nextPageIndex = flipView.SelectedIndex;

                        // find the index of the previous page
                        int previousPageIndex = flipView.GetIndexOfChildView(_previousPage);

                        // if we got it
                        if (-1 != previousPageIndex)
                        {
                            // are we moving forward or backward to get to the new page?
                            if (previousPageIndex < nextPageIndex)
                            {
                                moveDirection = INavigateMoveDirection.Forward;
                            }
                            else if (nextPageIndex < previousPageIndex)
                            {
                                moveDirection = INavigateMoveDirection.Backward;
                            }
                        }

                        // save the current page so we can navigate away from it later
                        _previousPage = (INavigate)((FlipViewItemEx)flipView.SelectedItem).GetChildViewAsObject();

                        // navigate to it
                        _previousPage.NavigateToPage(moveDirection);

                        // tell the navbar to move to it
                        this.BottomNavBar.MoveToPageIndex(nextPageIndex, (INavigateMoveDirection.Forward == moveDirection));

                        // telemetry - log section views
                        if (nextPageIndex < PAGE_ACCESSORIES)
                        {
                            TelemetryService.Current?.LogTelemetryEvent(TelemetryEvents.ViewExperience);
                        }
                        else if (nextPageIndex < PAGE_BESTOF)
                        {
                            TelemetryService.Current?.LogTelemetryEvent(TelemetryEvents.ViewAccessories);
                        }
                        else if (nextPageIndex < PAGE_COMPARE)
                        {
                            TelemetryService.Current?.LogTelemetryEvent(TelemetryEvents.ViewBestOf);
                        }
                        else
                        {
                            TelemetryService.Current?.LogTelemetryEvent(TelemetryEvents.ViewComparison);
                        }
                    }
                }
            }
        }