Navigating to another XAML page

winprofessional 41 Reputation points
2020-02-02T19:44:45.333+00:00

In my C++ UWP app there is a second page to which the app is navigating from the first. Here is the code I am using

this->Frame->Navigate(TypeName(BlankPage::typeid));

But when the second page(BlankPage) loads, it looks like as if it is loading from bottom to the frame of the first page. ie. a slow transition from bottom towards the top of the first window is seen. How can one avoid this? Is there any transition effects for this?

Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Fay Wang - MSFT 5,201 Reputation points
    2020-02-03T02:58:54.263+00:00

    Hello,​

    ​Welcome to our Microsoft Q&A platform!

    Two different animations are provided for navigation between pages in an app, Page refresh and Drill, and are represented by subclasses of NavigationTransitionInfo. If you want to avoid playing any animation during navigation, you can use SuppressNavigationTransitionInfo in the place of other NavigationTransitionInfo subtypes. You can try the following code. And about more details, you can refer to this document.

    this->Frame->Navigate(Windows::UI::Xaml::Interop::TypeName(BlankPage::typeid),NULL ,ref new Windows::UI::Xaml::Media::Animation::SuppressNavigationTransitionInfo());  
    
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. winprofessional 41 Reputation points
    2020-02-11T10:58:44.567+00:00

    Thanks . That worked !!!

    0 comments No comments