xamarin/Xamarin.Forms

[Bug] Shell NavBar BackgroundColor

开放

#6,298 创建于 2019年5月24日

 (8 条评论) (8 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/shell :shell:e/2 :clock2:help wantedm/high impact :black_large_square:p/iOS 🍎t/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description

Navbar Color set using Shell.BackgroundColor is not accurate.

Steps to Reproduce

  1. Set background color of shell using Shell.BackgroundColor

Expected Behavior

Correct color.

Actual Behavior

Color is lighter than actual

Basic Information

  • Version with issue: 4.0.0.425677
  • IDE: Visual Studio for MAC 8.0.7
  • Platform Target Frameworks:
    • iOS: 12.2
<Style x:Key="BaseStyle"
           ApplyToDerivedTypes="True"
           TargetType="Element">
        <Setter Property="Shell.FlyoutBackgroundColor"
                Value="White" />
        <Setter Property="Shell.BackgroundColor"
                Value="#2f353a" />
        <Setter Property="Shell.ForegroundColor"
                Value="White" />
        <Setter Property="Shell.TitleColor"
                Value="White" />
        <Setter Property="Shell.DisabledColor"
                Value="#B4FFFFFF" />
        <Setter Property="Shell.UnselectedColor"
                Value="#95FFFFFF" />
    </Style>
<Shell xmlns="http://xamarin.com/schemas/2014/forms" 
       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
       xmlns:local="clr-namespace:ABC" 
       xmlns:controls="clr-namespace:ABC.Controls"
       xmlns:views="clr-namespace:ABC.Views"
       x:Name="self"
       Title="Shelltest" x:Class="ABC.AppShell" Style="{StaticResource BaseStyle}">
    
   <Shell.FlyoutHeader>
        <controls:FlyoutHeader />
    </Shell.FlyoutHeader>
    <FlyoutItem Title="Home" FlyoutIcon="icons8_home_30.png" FlyoutDisplayOptions="AsSingleItem">
       <!-- <ShellContent>
            <views:HomePage />
        </ShellContent>-->
        <Tab Title="Dashboard" Icon="icons8_home_30.png">
            <ShellContent>
                <views:HomePage />
            </ShellContent>
        </Tab>
        <Tab Title="Page1" Icon="icons8_user_shield_30.png">
            <ShellContent>
                <views:Page1 />
            </ShellContent>
        </Tab>
    </FlyoutItem>

Screenshots

Color in display:

Color without using shell:

Actual Color:

Reproduction Link

贡献者指南