Replies: 1 comment
-
Or is this the right way to go ? using MauiModule.ViewModels; public class ViewCViewModel : ViewModelBase, IActiveAware, IPageLifecycleAware
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am testing Prism with a Tabbed Pages navigation flow in the Prism sample app, and I have observed the following behavior:
When I switch between tabs using the tab bar navigation (e.g., selecting Tab B from Tab A), the OnNavigatedTo method in Tab B's ViewModel and the OnNavigatedFrom method in Tab A's ViewModel are not being called.
However, when I use a button within the page to navigate programmatically to another tab using INavigationService.NavigateAsync, both lifecycle methods (OnNavigatedTo and OnNavigatedFrom) are triggered as expected.
Could someone please explain why this happens? Is this the intended behavior for Prism's navigation lifecycle with Tabbed Pages, or is there a recommended way to handle OnNavigatedTo and OnNavigatedFrom when switching tabs via the tab bar?
Recording.2024-11-23.232707.mp4
Beta Was this translation helpful? Give feedback.
All reactions