Home > database >  Changing windows title bar color in Xamarin.Forms UWP app
Changing windows title bar color in Xamarin.Forms UWP app

Time:01-25

How to override default blue titlebar color of Xamarin.Forms UWP app through AppShell style or something? Color Problem

CodePudding user response:

If you want to change the Blue color of the bar of your sceenshot in shell app,you can set the value of property 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>
  •  Tags:  
  • Related