xamarin / XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.58k stars 471 forks source link

[Bug] Tabview does not show content when used with StateLayout #1182

Open WiproSarthak opened 3 years ago

WiproSarthak commented 3 years ago

Tabview do not load each tabItem content when used with statelayout.When the page loads for the first time tabview is hidden due to loading state of statelayout once statelayout currentstate becomes succes, only TabView Header shows its content didn't show up

Steps to Reproduce

  1. Put TabView insisde StateLayout success state
  2. Open page with any other state then success.
  3. Wait for few second and set Statelayout current state to Success

Expected Behavior

TabView should appear with contents of each TabItem

Actual Behavior

Only Tab header is visible content of each Item didn't show up

Basic Information

Reproduction Link : TabViewStateLayoutIssueRepo.zip

Steps:

  1. MainPage opens with Empty state for StateLayout
  2. Click on LoadTabView
  3. Current state becomes succes only tabview headers show each tab items content remains still hidden
Chris-Marassovich commented 3 years ago

I have also hit this issue.
A shame as the StateLayout is awesome as is the TabView ... yet cannot work together. :-(

@WiproSarthak did you find a workaround? I assume you went back to having show/hide variables in your VM and binding to IsVisible props on the layout?

SarthakGz commented 2 years ago

@Chris-Marassovich unfortunately I had to move StateLayout from outside to inside the each TabView so TabView will be Visibile when page loads.If we do IsVisible=false to entire TabView by default when page loads so again same issue arises as StateLayout is also doing the same thing.

bijington commented 2 years ago

I suspect this issue relates to #1294

It appears that the underlying CarouselView in the TabView does not correctly update its child views

SarthakGz commented 2 years ago

This might have fixed by this https://github.com/xamarin/Xamarin.Forms/pull/13370 need to verify though