Skip to content

WinUI: NavigationPage transitions still animate when passing animated: false to PushAsync/PopAsync #11808

@ArrowCase

Description

@ArrowCase

Description

When using PushAsync and PopAsync with no parameters or when passing animated: true, the page transitions animate from side to side as expected. However, when passing animated: false, a different vertical animation still occurs on Windows 10.

Steps to Reproduce

  1. Create a new MAUI app
  2. Replace MainPage = new AppShell() with MainPage = new NavigationPage(new MainPage()) in App.xaml.cs
  3. Add a second content page and write event handlers in the code behind to allow navigating between the two pages with App.Current.MainPage.Navigation.PushAsync/PopAsync and pass animated: false to those methods.

Expected behavior: There is no transition animation, and the new page appears instantly.

Actual behavior: The new page slides up from the bottom of the screen.

Link to public reproduction project repository

https://github.com/ArrowCase/TestMauiTransition

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows SDK 10.0.19041.0

Did you find any workaround?

For some reason, if the first page is removed from the navigation stack after awaiting the PushAsync call, there is no longer an animation for the transition.

Page firstPage = App.Current.MainPage.Navigation.NavigationStack[^1];
await App.Current.MainPage.Navigation.PushAsync(new SecondPage(), animated: false);
App.Current.MainPage.Navigation.RemovePage(firstPage);

Obviously, this is not a real workaround.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-navigationNavigationPageplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions