Skip to content

[BUG] Tabbed Page doesn't show icons and title when using NavigationPage #3035

@sact1909

Description

@sact1909

Description

Tabbed Page doesn't show Icons and Title when adding AddNavigationPage().AddSegment() to CreateTab() method.

I try to use the following code on the pages that I'm using to create the tabs but it's still happen
prism:TabbedPage.IconImageSource="setting.png"
prism:TabbedPage.Title="Page Three"

Current Behavior

Recording.2023-12-27.042752.mp4

Expected Behavior
Screenshot_1703669492

Steps to Reproduce

  1. Create a MAUI App using Prism Template
  2. Create MAUI TabbedPage (it doesn't matter if you avoid this step and create the tabbed page with the extension method)
  3. Add the Tabs to TabbedPage using ExtensionQueryMethod in the PrismStartup.cs
    image
  4. Add IconImageSource to the Tabs Pages
  5. Run the app.

(It still happen using a MAUI App Template and adding the corresponding libraries to use Prism).

Sample Project
TestPrismMaui.zip

Platform with bug

.NET MAUI

Affected platforms

Android

Did you find any workaround?

The only way this works is adding the pages manually to the TabbedPage with its NavigationPage

<NavigationPage Title="PageOne" IconImageSource="bowlricesolid.svg"> <x:Arguments> <locals:PageOne /> </x:Arguments> </NavigationPage>

but, the prism documentation specifies that you don't recommend doing this, but it is the only way that the application has the expected behavior using the TabbedPage, the app looks working properly, using for a while and no crashing any time, but if you warning us about it, is because there is something you know that we don't, but in other ways, it doesn't work and its better if I do as you recommend it.
image

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions