Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

[Bug] TabBarBackgroundColor of ShellContent not instantly updating upon UserAppTheme changed

Open Cfun1 opened this issue 3 years ago • 4 comments

Description

When changing UserAppTheme, the styled TabBarBackgroundColor property with AppThemeBinding is not changing instantly but only when a navigation action is done.

Steps to Reproduce

  1. <Application.Resources>
     <Style TargetType="{x:Type ShellContent}">
         <Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Dark=red, Light=yellow}"/>
     </Style>
     </Application.Resources>
    
  2. Change UserAppTheme from light to dark or opposite.

Expected Behavior

Color of TabBarBackgroundColor takes effect instantly when UserAppTheme changes.

Actual Behavior

Color of TabBarBackgroundColor takes effect only after navigating in top tabs or bottom tabs (hanging the page).

Basic Information

  • Version with issue: 5.0.0.1791-pre5.
  • Platform Target Frameworks: Tested on android only.
  • Android Support Library / AndroidX Version: Android 10.0 API 29

Cfun1 avatar Dec 12 '20 11:12 Cfun1

@Cfun1 thanks for submitting this issue! It seems to be a duplicate of https://github.com/xamarin/Xamarin.Forms/issues/12807 - can you confirm this?

rachelkang avatar Dec 22 '20 16:12 rachelkang

@rachelkang my issue is not about animation neither during app startup but during running, although I cannot confirm if the root cause of theses two issues is common, it could be.

Cfun1 avatar Dec 22 '20 16:12 Cfun1

Can reproduce the issue: Issue13123.zip issue13123

jsuarezruiz avatar Feb 08 '21 13:02 jsuarezruiz

Same with iOS. Most of my elements change according to AppThemeBinding, but my FlyoutBackground doesn't change. It only changes when the app reloads.

ChristianFrom avatar Mar 09 '21 08:03 ChristianFrom