BurkusCat / Burkus.Mvvm.Maui

A simple MVVM framework for .NET MAUI. It provides: navigation, lifecycle events, parameter passing, native dialog abstractions, and testability.
MIT License
27 stars 5 forks source link

[Feature] Advanced navigation method: ReplaceTopPage #11

Closed BurkusCat closed 1 year ago

BurkusCat commented 1 year ago

Is your feature request related to a problem? Please describe. A common navigation scenario that can be tricky to implement because of pages being disposed/call order/animations is replacing the top page of a stack with a different page (i.e. a pop and a push).

Describe the solution you'd like A new, convenient method that replaces the top page of the stack in a way that doesn't have any visual jank.

Describe alternatives you've considered This can be manually done but a library method would be better.

Proposed APIs

// INavigationService
Task ReplaceTopPage<T>();
Task ReplaceTopPage<T>(NavigationParameters parameters);

Additional context N/A