Description
Description
In the beginning, there is one tab visible ( tab 1 ) and two tabs hidden ( tab 2 and tab 3 ) on a TabBar. Then I want to display tab 2 and tab 3. Meanwhile, hide tab 1.
- Here is the code to do it.
Tab2.IsVisible = true;
Tab3.IsVisible = true;
Tab1.IsVisible = false;
Run in Android platform, the result is:
If you tap 'Tab 3' tab header, the app will crash.
When run in Windows platform, the result is correct.
- If I use the code below.
Tab1.IsVisible = false;
Tab2.IsVisible = true;
Tab3.IsVisible = true;
Then run in Android platform, the result is correct.
But run in Windows platform, the app will crash.
A repro project is provided: https://github.com/SamShanWang/maui-shell-tab-hide-bug.git
Steps to Reproduce
- Load repro project in VS and run on Android platform.
- Click the menu item 'Tap me to reproduce bug on android' on flyout.
- Notice the view of TabBar.
- Tap 'Tab 3' tab header, the app crashes.
- Then run on Windows platform.
- Click the menu item 'Tap me to reproduce bug on windows' on flyout. Then the app crashes.
Version with bug
9.0.408 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows, I was not able test on other platforms
Affected platform versions
Android 7.1, Android 9.0, Windows 10 version 19044.1826, I was not able test on other platform versions
Did you find any workaround?
No response
Relevant log output
No response