Xaml 如何在Xamarin.forms中更改选项卡栏背景色

Xaml 如何在Xamarin.forms中更改选项卡栏背景色,xaml,xamarin.forms,Xaml,Xamarin.forms,我有一个选项卡式页面,无法更改栏背景颜色。 我的XAML页面如下所示 <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Saturn;assembly=Saturn" BarBackgr

我有一个选项卡式页面,无法更改栏背景颜色。 我的XAML页面如下所示

<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:Saturn;assembly=Saturn"
             BarBackgroundColor="Orange">
<ContantPage></Contantpage>
<ContantPage></Contantpage>
<ContantPage></Contantpage>
<ContantPage></Contantpage>
<ContantPage></Contantpage>


但默认颜色显示为黑色。如何将其更改为Ornage。

您可以更改styles.xml文件中的colorAccent,但这也会更改应用程序的主题颜色,这适用于Android项目

我认为您需要为Android和iOS创建一个自定义渲染器,这是Android的一个良好开端