Tabbed Pages inside Flyout Page in Maui

Chinmay Dole 245 Reputation points
2024-07-29T03:48:44.6766667+00:00

I have an application with Maui .NET 8. I want to show tabbed pages and based on the page from the tabbed page selected I want to show the title to the Flyout page. How can I achieve this?

Developer technologies | .NET | .NET MAUI
{count} votes

Accepted answer
  1. Anonymous
    2024-07-29T07:07:41.97+00:00

    Hello,

    You cannot show the Title of pages in the Tabbedpage to the Flyoutpage.

    But you can use Shell to implement it. Please add ShellContent to the FlyoutItem and set the title property for the ShellContent.

    <Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           xmlns:views="clr-namespace:Xaminals.Views"
           x:Class="Xaminals.AppShell">
        ...
        <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
           
            <ShellContent Title="Monkeys"
                          Icon="monkey.png"
                          ContentTemplate="{DataTemplate views:MonkeysPage}" />
            <ShellContent Title="Elephants"
                          Icon="elephant.png"
                          ContentTemplate="{DataTemplate views:ElephantsPage}" />
            <ShellContent Title="Bears"
                          Icon="bear.png"
                          ContentTemplate="{DataTemplate views:BearsPage}" />
        </FlyoutItem>
        ...
    </Shell>
    

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.