Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin remove app title

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

like image 204
phadaphunk Avatar asked Dec 09 '13 21:12

phadaphunk


2 Answers

Write this in the OnCreate method just after SetContentView:

ActionBar.Hide();  
like image 178
SeyedPooya Soofbaf Avatar answered Sep 23 '22 23:09

SeyedPooya Soofbaf


As far as I remember, in your Activity Class you have to remove the Attribute label there so that it won't have a title. I currently don't have Xamarin with me right now but I'm pretty sure there is an attribute above the class name that sets the Title.

UPDATE from phadaphunk:

Remove android:theme="@android:style/Theme.NoTitleBar" from the manifest file will completely remove the title

UPDATE

NavigationPage.SetHasNavigationBar(this, false); 

At the time I wrote the answer, the best answers that are given now are available to the framework. Correct me if I'm wrong but I don't remember those API being available at the time of this writing.

like image 39
123 456 789 0 Avatar answered Sep 23 '22 23:09

123 456 789 0