Xamarin remove app title

Viewed 38114

I'm struggling with the dumbest thing (I guess I'm just not used to the Xamarin Designer).

How can I remove the title of my app ? It keeps showing up but it is not in my Layout Source.

I want to remove this whole part but can't figure out how.
In C# Winforms or WPF I would have selected the whole window or screen and then accessed the main window properties but in this case, I can only select the controls I added (buttons and labels) and not the whole screen or the title.

enter image description here

14 Answers

In my case I dont't need any Title, I just want an ActionBar with some Tabs so I wrote:

RequestWindowFeature(Android.Views.WindowFeatures.ActionBar);

And after SetContentView:

ActionBar.Title = "";

This worked for me:SupportActionBar.SetDisplayShowTitleEnabled(false);

To remove the title bar, I just changed the "Style.xml" file:

Add this line in below other items:

<item name="windowNotitle">true</item>

This will remove the title bar from the "AppTheme", you can also create a custom theme next to it in and set it in your activity.

[2021] You can set the theme as following:

[Activity(Label = "@string/app_name", Theme = "@style/Theme.AppCompat.Light.NoActionBar", MainLauncher = true)]

Just add this to app style (Resources/values/styles.xml):

<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>

Should look like:

<resources>
    <style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
</resources>

Just put this NavigationPage.HasNavigationBar="False"under your ContentPage

It works in the latest versions

SupportActionBar.Hide(); worked to hide the entire title bar for me.

Related