How do I change the Title Background color On Windows Platform (Xamarin)

4k Views Asked by At

Screen Shot I am developing an application using Xamarin Forms in Visual Studio 2013. I have managed to change the Header Background color for Android but I am failing to do the same for Windows project. It comes with the Default Dark theme. Please Assist me. Thank You

3

There are 3 best solutions below

0
On BEST ANSWER

NavigationPage.BarBackgroundColorProperty Works! Thank You for your suggestions.

2
On

Your question is not very clear to me, but I think that this is what you mean. With "Header Background color" I think you mean the background color of the title of a page.

This is the code I use in my Xamarin.Forms application. The code works on Android, iOS and UWP.

public class ExamplePage : ContentPage
{
    public ExamplePage()
    {
        Title = "Example Page";
        BackgroundColor = Color.Blue; //Make this any color you like

        Content = null; //put your own content here
    }
}

You can specify the color of the background color on every page.

0
On
 <StackLayout.BackgroundColor>
            <OnPlatform x:TypeArguments="Color"
                                    Android="#51C0D4"
                                    WinPhone="#51C0D4"
                                    iOS="#51C0D4"></OnPlatform>
    </StackLayout.BackgroundColor>