Skip to content

[BUG] <When SelectTabAsync calls OnNavigatedTo on the target page parameters.GetNavigationMode() will result in: System.ArgumentNullException> #3310

Open
@DaveDaBrave

Description

@DaveDaBrave

Description

If in the app a tab gets selected manually OnNavigatedTo() doesn't get called.
If a navigation in code gets triggered, as for example via the button with title "Click me" on the first tab, OnNavigatedTo() gets also called on the target tab's page.

When SelectTabAsync calls OnNavigatedTo on the target page parameters.GetNavigationMode() will result in:

System.ArgumentNullException: Value cannot be null.
(Parameter 'NavigationMode is not available')
at
Prism.Navigation.NavigationParametersExtensions.GetNavigationMode(INavigationParameters parameters)

Reproduction project is available here: PrismGetNavigationModeNull

Steps to Reproduce

  1. Start the app and tap button "Click me" => 4th tab gets selected and also OnNavigatedTo gets called with 'NavigationMode is not available'
  2. If 4th tab is selected manually OnNavigatedTo doesn't get called

Platform with bug

.NET MAUI

Affected platforms

iOS

Did you find any workaround?

No

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions