xamarin – How you can do away with the Shell TabBar Title area utilizing MAUI on iOS?


Take into account the next picture:

Screenshot of app on iOS

I made this utilizing MAUI with the default Shell, like this:

<Shell
    x:Class="MyApp.AppShell"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:pages="utilizing:MyApp.Pages"
    FlyoutBehavior="Disabled"
    BackgroundColor="Purple">
    <TabBar>
        <Tab>
            <ShellContent Title="Title" ContentTemplate="{DataTemplate pages:MainPage}" />
        </Tab>
    </TabBar>
</Shell>

As a result of the TabBar is implicitly for those who omit it, I simply left it.

This Shell is then utilized by assigning MainPage on the Utility, like so:

MainPage = new AppShell();

I’ve tried every kind of various issues to cover the title:

  • Not assigning a Title to the Tab, however it will simply depart one clean area.
  • Shell.TabBarIsVisible="false" and comparable choices, even by doing it by means of code earlier than and after part initialization and transferring the XAML instruction to the ShellContext XAML as an alternative.
  • Shell.NavBarIsVisible="false" appears to do one thing, however it can additionally disguise the iOS statusbar and nonetheless reserve the area.
  • I’ve tried to examine the aspect utilizing the XAML debugger, so I can set a IsVisible property or one thing.
  • Assign my web page that doesnt have any TabBar in any respect on to the MainPage, it can nonetheless reserve the area then.
  • I even went by means of the MAUI supply to scout for one thing fascinating, with no luck.

I am at a loss by now and easily cannot discover something to get it to work. Might somebody level me in the proper course to take away the Title and the reserved spacing? All of this appears to work positive on Android and UWP, simply not iOS…

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles