xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] Re-rendering of ShellItems #14208

Open TimLandskron opened 3 years ago

TimLandskron commented 3 years ago

Description

In the attached repro solution, there's an application using the Xamarin.Forms.Shell. Inside the shell, there are 4 tabs. Each tab has the main page as content. The main page contains a button which is modifying the color and size of the current shell icon.

Steps to Reproduce

  1. Build & deploy the attached repro solution
  2. Click the button on each page

Expected Behavior

Every tab icon should be blue with a size of 100

Actual Behavior

Only 3 tab icons are blue with a size of 100

Environment

Show/Hide Visual Studio info ``` === Visual Studio Enterprise 2019 for Mac === Version 8.9.6 (build 6) Installation UUID: fef3816a-9593-47c3-8c7c-b65b6c516fc1 GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638) Package version: 612000125 === Mono Framework MDK === Runtime: Mono 6.12.0.125 (2020-02/8c552e98bd6) (64-bit) Package version: 612000125 === Roslyn (Language Service) === 3.9.0-6.21152.10+c10f884b30737542ddd84ca889a4aad9281ce210 === NuGet === Version: 5.8.0.6860 === .NET Core SDK === SDK: /usr/local/share/dotnet/sdk/5.0.202/Sdks SDK Versions: 5.0.202 5.0.201 3.1.408 3.1.407 MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks === .NET Core Runtime === Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 5.0.5 5.0.4 3.1.14 3.1.13 === .NET Core 3.1 SDK === SDK: 3.1.408 === Xamarin.Profiler === Version: 1.6.15.68 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler === Updater === Version: 11 === Apple Developer Tools === Xcode 12.4 (17801) Build 12D4e === Xamarin.Mac === Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version. === Xamarin.iOS === Version: 14.14.2.5 (Visual Studio Enterprise) Hash: 3836759d4 Branch: d16-9 Build date: 2021-02-10 17:56:44-0500 === Xamarin Designer === Version: 16.9.0.323 Hash: 1b4790c08 Branch: remotes/origin/d16-9 Build date: 2021-03-31 05:12:20 UTC === Xamarin.Android === Version: 11.2.2.1 (Visual Studio Enterprise) Commit: xamarin-android/d16-9/877f572 Android SDK: /Users/timlandskron/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: None installed SDK Tools Version: 26.1.1 SDK Platform Tools Version: 30.0.4 SDK Build Tools Version: 30.0.2 Build Information: Mono: 5e9cb6d Java.Interop: xamarin/java.interop/d16-9@54f8c24 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.34.1@daff8f4 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-9@d210f11 === Microsoft OpenJDK for Mobile === Java SDK: /Users/timlandskron/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25 1.8.0-25 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL === Android SDK Manager === Version: 16.9.0.22 Hash: a391de2 Branch: remotes/origin/d16-9~2 Build date: 2021-03-24 08:30:26 UTC === Android Device Manager === Version: 16.9.0.17 Hash: fc2b3db Branch: remotes/origin/dev/jmt/d16-9bump~1 Build date: 2021-03-24 08:30:44 UTC === Build Information === Release ID: 809060006 Git revision: 47cf16e38721a785b8e2296ce6716502f34261ac Build date: 2021-04-07 07:23:18-04 Build branch: release-8.9 Xamarin extensions: 47cf16e38721a785b8e2296ce6716502f34261ac === Operating System === Mac OS X 10.16.0 Darwin 20.3.0 Darwin Kernel Version 20.3.0 Thu Jan 21 00:07:06 PST 2021 root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64 ```

Screenshots

Before clicking all the buttons

Screenshot 2021-04-23 at 12 41 34

After clicking all the buttons

Screenshot 2021-04-23 at 12 41 49

Reproduction Link

FontImageSourceIssue.zip

Workaround

Setting a new FontImageSource object seems to trigger the rerendering process

rachelkang commented 3 years ago

Confirming that I'm able to reproduce, even on the latest version of XF 5. I'm noticing it's not always the first one that can't be modified, but it's always the case that only 3 of them can change.

@PureWeen do you know what might be going on here?