Xamarin表单:如何更改Master Detail内容页的背景色?

Xamarin表单:如何更改Master Detail内容页的背景色?,xamarin,xamarin.forms,background-color,master-detail,Xamarin,Xamarin.forms,Background Color,Master Detail,我在我的项目中有一个主细节页面,并在其中添加了一些内容页面作为子页面。如何更改子内容页顶部栏的颜色?我使用在顶部栏上添加了一些图标 我需要改变红方块的背景色。我已经尝试了首选解决方案,但这并没有解决我的问题。要更改Android导航栏的背景色,请执行以下步骤: Go to your Android Project -> Resources -> values -> styles.xml 使用所需的十六进制颜色代码打开style.xaml文件更新colorPrimary值 &

我在我的项目中有一个主细节页面,并在其中添加了一些内容页面作为子页面。如何更改子内容页顶部栏的颜色?我使用
在顶部栏上添加了一些图标


我需要改变红方块的背景色。我已经尝试了首选解决方案,但这并没有解决我的问题。

要更改Android导航栏的背景色,请执行以下步骤:

Go to your Android Project -> Resources -> values -> styles.xml
使用所需的十六进制颜色代码打开style.xaml文件更新
colorPrimary

<!-- colorPrimary is used for the default action bar background -->
    <item name="colorPrimary">#3478c9</item>

#3478c9
对于iOS这可以从App.xaml文件控制,无需在iOS项目中写入任何内容

<Application.Resources>
    <ResourceDictionary>

      <!-- Styles -->
      <Style TargetType="NavigationPage">
        <Setter Property="BarBackgroundColor" Value="#3478c9"/>
        <Setter Property="BarTextColor" Value="White"/>
      </Style>
      <!-- Styles -->

    </ResourceDictionary>
  </Application.Resources>

要更改Android导航栏的背景色,请执行以下步骤:

Go to your Android Project -> Resources -> values -> styles.xml
使用所需的十六进制颜色代码打开style.xaml文件更新
colorPrimary

<!-- colorPrimary is used for the default action bar background -->
    <item name="colorPrimary">#3478c9</item>

#3478c9
对于iOS这可以从App.xaml文件控制,无需在iOS项目中写入任何内容

<Application.Resources>
    <ResourceDictionary>

      <!-- Styles -->
      <Style TargetType="NavigationPage">
        <Setter Property="BarBackgroundColor" Value="#3478c9"/>
        <Setter Property="BarTextColor" Value="White"/>
      </Style>
      <!-- Styles -->

    </ResourceDictionary>
  </Application.Resources>


对于ios,我如何更改颜色?我需要更改所有平台的颜色。更新我的答案,尝试再次更新你的答案,以保持应用程序的UIOS的一致性。对于ios,我如何更改颜色?我需要更改所有平台的颜色。更新我的答案,尝试再次更新你的答案,以保持应用程序UI的一致性