Xamarin.forms: [Bug] UWP: TitleBar ForgroundColor not changing

Created on 30 May 2020  ·  4Comments  ·  Source: xamarin/Xamarin.Forms

Description

in my UWP projects i can't change the color of TitleBar's Text! it's always Black.
and also i tested RGBA too and nothing happend.

Steps to Reproduce

  1. in UWP project>mainpage.xaml.cs> add the following

    var titleBar = ApplicationView.GetForCurrentView().TitleBar;
    titleBar.ForegroundColor = Windows.UI.Colors.White;

  2. and build the app

Expected Behavior

TitleBar forground color change.

Basic Information

  • Version with issue: 4.6
  • Last known good version: unknown
  • IDE: Visual Studio 16.6
  • UWP: TargetVersion: 10.0.18362.0 TargetMinVersion: 10.0.17763.0

Screenshots

Screenshot (833)_LI

UWP unverified bug

All 4 comments

I have tried to reproduce the issue without success:
Captura de pantalla 2020-06-01 a las 10 07 37

titleBar.BackgroundColor = Colors.Purple;
titleBar.ButtonBackgroundColor = Colors.Yellow;
titleBar.ForegroundColor = Colors.GreenYellow;

Attached the reproduction sample using latest Xamarin.Forms 4.6 version:
Issue10900.zip

@mhrastegary77 Could you attach a reproduction sample?

@jsuarezruiz it seems White color doesn't works for Forground with light colors on Background.
so i think it's a winui issue right? :(

titleBar10900.zip

Something like Color.FromArgb(255, 254, 254, 254) must work.

Thanks it worked ❤

Was this page helpful?
0 / 5 - 0 ratings