在 Xamarin.Forms UWP 应用程序中更改 windows 标题栏颜色

Changing windows title bar color in Xamarin.Forms UWP app

如何通过 AppShell 样式或其他方式覆盖 Xamarin.Forms UWP 应用的默认蓝色标题栏颜色? Color Problem

如果您想在 shell 应用程序中更改屏幕截图栏的 Blue 颜色,您可以设置 属性 Shell.BackgroundColor 的值:

<Shell.Resources>
    <ResourceDictionary>
        <Style x:Key="BaseStyle" TargetType="Element">
            
            <!--change the color here-->
            <Setter Property="Shell.BackgroundColor" Value="#96F3" />

            <Setter Property="Shell.ForegroundColor" Value="White" />
            <Setter Property="Shell.TitleColor" Value="White" />
            <Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" />
            <Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" />
            <Setter Property="Shell.TabBarBackgroundColor" Value="{StaticResource Primary}" />
            <Setter Property="Shell.TabBarForegroundColor" Value="White"/>
            <Setter Property="Shell.TabBarUnselectedColor" Value="#95FFFFFF"/>
            <Setter Property="Shell.TabBarTitleColor" Value="White"/>
        </Style>
        <Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />
        <Style TargetType="FlyoutItem" BasedOn="{StaticResource BaseStyle}" />
    </ResourceDictionary>
</Shell.Resources>