Xamarin Forms control the color/title of the header bar

后端 未结 4 763
孤城傲影
孤城傲影 2021-02-02 00:08

I have the following form created with Xamarin Forms. I have drawn in a red rectangle to highlight the problem area. I need the blue color in the header to be a different colo

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-02 00:39

    The BarBackgroundColor is a property of the NavigationPage class:

    public App()
    {
        MainPage = new NavigationPage(new Page1())
        {
            BarBackgroundColor = Color.FromHex("#ff5300"),
            BarTextColor = Color.White,
        }; 
    }
    

提交回复
热议问题