Forum General

How to set background color of toolbar in windows phone using xamarin.forms?

shubhrakushalshubhrakushal USMember ✭✭

I want to set the background color of the application bar blue in windows phone 8.1 .how can i do it in xamarin.forms? Do I have to write the native code for the same how to do that?

Best Answer


  • JohnHardmanJohnHardman GBUniversity mod

    @shubhrakushal - Which form of WinPhone - Silverlight or WinRT ?

  • shubhrakushalshubhrakushal USMember ✭✭

    @JohnHardman I am using WinRT

  • JohnHardmanJohnHardman GBUniversity mod
    edited July 2016

    @shubhrakushal - actually, it's in the common code. I have it in the App constructor in App.xaml.cs

                MainMenuPageView mainPageView = new MainMenuPageView();
        NavigationPage navigationPage = new NavigationPage(mainPageView);
                navigationPage.BarTextColor = Color.Red;
                navigationPage.BarBackgroundColor = Color.Yellow;
                navigationPage.BackgroundColor = Color.Green;

    I hasten to add that those aren't the colors that I use :-)

  • shubhrakushalshubhrakushal USMember ✭✭

    @JohnHardman Hey John I have tried that solution but it didn't work for me...... so I found the solution for the above issue is in windows phone 8.1 project there is a file name Mainpage.Xaml write the following code.



    In the Picture shared below,the marked portion will get the blue color.

Sign In or Register to comment.