Xamarin.forms如何更改导航栏颜色 [英] Xamarin.forms how to Change the Nav Bar Color

查看:92
本文介绍了Xamarin.forms如何更改导航栏颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在便携式类库项目上更改导航BarBackgroundColor的背景颜色,因此如何在 Xamarin.Forms

I am trying to change the nav BarBackgroundColor background color on portable class library project, so how to Change the Nav Bar Color on Xamarin.Forms

推荐答案

导航页具有您可以设置的BarBackgroundColor属性.

The NavigationPage has a BarBackgroundColor property which you can set.

https://developer.xamarin.com/api/type/Xamarin .Forms.NavigationPage/

var nav = new NavigationPage(new ContentPage { Title = "Page" } );
nav.BarBackgroundColor = Color.Blue;

这篇关于Xamarin.forms如何更改导航栏颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆