Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Xamarin Flyout Tab Initialization Issue #15312

Open
sisaacks opened this issue Apr 13, 2022 · 0 comments
Open

[Bug] Xamarin Flyout Tab Initialization Issue #15312

sisaacks opened this issue Apr 13, 2022 · 0 comments
Labels
s/unverified New report that has yet to be verified t/bug 🐛

Comments

@sisaacks
Copy link

sisaacks commented Apr 13, 2022

Description

I have an Xamarin Shell Flyout Application. Prior to the pervious updates it worked find. After some testing I found the issue.
Say I have a Xamarin Flyout App
Flyout 1 has Tab A
Flyout 2 has Tab B

When the app starts it starts on Flyout 1 Tab A.

Tab A view model has a property IsInitialized which is set to true in OnAppearing()
If I then navigate to Tab B in the second flyout and back to Tab A, IsInitialized reads as false, even though it was set to true. If I then navigate back to Tab B and back to Tab A now IsInitialized is true. Prior to the last update, the tab initialized on load and did not require two navigations to initialize.

After more testing I found the culprit behind this behavior. The flyout has a property called FlyoutDisplayOptions. If that is set to AsMultipleItems then I get the behavior I described above. However if I use the value IsSingleItem I dont see the behavior above. AsMultipleItems was working on the version before I updated. I think I was on 5.0.0.2125 but I am not for certain.

Steps to Reproduce

  1. Create An Xamarin Fly out application with two flyouts and each flyout has one tab.
  2. Add the property FlyoutDisplayOptions="AsMultipleItems" to each flyout
  3. When the the app starts and the first tab loads, ensure you set IsInitialized to True in OnAppearing in the view model.
  4. Navigate to the tab in the the other flyout
  5. Navigate back to the starting tab in the first flyout
  6. Check the value of IsInitialized in the view model....its still says false when it should says true.
  7. Stop the app and change each flyout property to FlyoutDisplayOptions="AsSingleItem"
  8. Repeat steps 3-6 above and you will see now that IsInitialized is True as it should be.

Expected Behavior

I would expect the tab to be initialized on start up

Actual Behavior

The tab is not initialized on startup

Basic Information

  • Version with issue:
  • Last known good version:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices:

Environment

Xamarin Essentials 1.7.2
Xamarin Forms 5.0.0.2401
Microsoft Visual Studio Professional 2022 (64-bit) Version 17.1.4

Show/Hide Visual Studio info

Build Logs

Screenshots

Reproduction Link

Workaround

@sisaacks sisaacks added s/unverified New report that has yet to be verified t/bug 🐛 labels Apr 13, 2022
@sisaacks sisaacks changed the title [Bug] [Bug] Xamarin Flyout Tab Initialization Issue Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

1 participant