Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide the title bar on a TabbedPage only on Android?

In Android, because the tab bar is at top, I don't need both title bar and tab bar to say which tab you're on.

This will hide the title bar for both platforms:

<TabbedPage>
    <NavigationPage Title="Page 1">
        <x:Arguments>
            <local:Page1 NavigationPage.HasNavigationBar="false"/>
        </x:Arguments>
    </NavigationPage>
</TabbedPage>

1 Answers

try this:

    <NavigationPage Title="Page 1">
    <x:Arguments>
        <Page>
            <NavigationPage.HasNavigationBar>
                <OnPlatform x:TypeArguments="x:Boolean">
                        <On Platform="Android" Value="False"></On>
                </OnPlatform>
            </NavigationPage.HasNavigationBar>
        </Page>
    </x:Arguments>
</NavigationPage>
like image 133
App Pack Avatar answered Nov 03 '25 14:11

App Pack